Area code lookup
Find the region or service assigned to a three-digit North American area code. Look up US, Canadian, Caribbean, and territory codes, including toll-free codes that are shared across locations.
Area code or country calling code?
In +1 305 555 0134, +1 is the country calling code and 305 is the area code. Enter 305 here. The +1 numbering plan includes the US, Canada, and several Caribbean countries and territories.
Geographic and toll-free codes
A geographic code belongs to an assigned region, which can cover several cities. Overlay codes allow more than one area code to serve the same region. A toll-free code such as 800 identifies a service instead of a single location.
The region is the number's assignment, not the caller's current position. Someone can retain a mobile number after moving or use it while traveling.
Build an area code lookup
Match the area code in the official NANPA directory, then use the Country SDK to display its country name. Geographic and service assignments still come from NANPA.
- Read the official NANPA CSV with its quoted fields.
- Index assigned, in-service area codes as three-character strings.
- Display the location or service and the published time-zone labels.
Installation steps are included in each example. Set PARSEAPI_KEY on your server. Swift and Kotlin use an app key restricted to your app ID.
// npm install @parseapi/sdk@1.14.0
import { parseAPI } from '@parseapi/sdk';
// Set PARSEAPI_KEY on your server.
const parse = parseAPI();
function parseCsv(text) {
const rows = []; let row = [], field = '', quoted = false;
for (let i = 0; i < text.length; i++) {
const ch = text[i];
if (quoted) {
if (ch === '"' && text[i + 1] === '"') { field += '"'; i++; }
else if (ch === '"') quoted = false;
else field += ch;
} else if (ch === '"') quoted = true;
else if (ch === ',') { row.push(field); field = ''; }
else if (ch === '\n' || ch === '\r') {
if (ch === '\r' && text[i + 1] === '\n') i++;
row.push(field); field = '';
if (row.some(value => value !== '')) rows.push(row);
row = [];
} else field += ch;
}
if (quoted) throw new Error('Unclosed CSV field.');
if (field || row.length) { row.push(field); rows.push(row); }
return rows;
}
const response = await fetch('https://reports.nanpa.com/public/npa_report.csv', {
signal: AbortSignal.timeout(15000),
});
if (!response.ok) throw new Error('Area code directory unavailable.');
const rows = parseCsv(await response.text());
const start = rows.findIndex(row => row[0] === 'NPA_ID');
if (start < 0) throw new Error('Area code directory format changed.');
const headers = rows[start].map(value => value.trim());
const records = rows.slice(start + 1).map(row => Object.fromEntries(
headers.map((key, index) => [key, row[index]?.trim() ?? ''])));
const code = '305';
if (!/^[2-9]\d{2}$/.test(code)) throw new Error('Enter a three-digit area code.');
const result = records.find(row => row.NPA_ID === code && row.ASSIGNED === 'Yes' && row.IN_SERVICE === 'Y');
if (!result) throw new Error('Area code is not in service in this directory.');
const country = /^[A-Z]{2}$/.test(result.COUNTRY)
? await parse.country(result.COUNTRY) : null;
console.log({ code, countryName: country?.name ?? null, location: result.LOCATION || null,
country: result.COUNTRY || null, service: result.SERVICE || null,
timeZoneCodes: result.TIME_ZONE || null });
// TIME_ZONE contains NANPA letter codes; decode them using the report field definitions.
// For a full phone number's formats and number-level details, use the Phone API.
What is an area code?
In the North American Numbering Plan, it is the three digits after the +1 calling code. In +1 305 555 0134, look up 305. An area code identifies an assigned region or service.
Is +1 the area code for the United States?
+1 is a shared country calling code for the US, Canada, and several Caribbean countries and territories. The next three digits distinguish the area code. Other country calling codes belong in the country codes list.
Why do several area codes serve the same city?
An overlay adds another area code to an existing region as numbering capacity is needed. A city can therefore have more than one valid area code.
Where is an 800 number located?
800 is a toll-free service code, not a city or state. Toll-free numbers can serve callers across the numbering plan.
Can an area code identify the caller or current carrier?
It cannot identify a person, current carrier, or the phone’s present location. A mobile number can be kept after a move, and number portability can change the carrier.
Why was my area code not found?
Enter three digits rather than a full phone number or country prefix. A well-formed code can still be unassigned, not yet in service, or outside the North American directory.