Skip to content

Instantly share code, notes, and snippets.

@awave1
Created February 23, 2021 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awave1/93a97acf84164cb40a4dba6f7d687b6e to your computer and use it in GitHub Desktop.
Save awave1/93a97acf84164cb40a4dba6f7d687b6e to your computer and use it in GitHub Desktop.
/**
* US area codes arranged by state
* source: NPA Database - https://www.nationalnanpa.com/reports/reports_npa.html
*/
export const US_AREA_CODES = {
Alabama: ['205', '251', '256', '334', '659', '938'],
Alaska: ['907', 'Hyder', '236', '250', '778'],
Arizona: ['480', '520', '602', '623', '928'],
Arkansas: ['327', '479', '501', '870'],
California: [
'209',
'213',
'279',
'310',
'323',
'341',
'408',
'415',
'424',
'442',
'510',
'530',
'559',
'562',
'619',
'626',
'628',
'650',
'657',
'661',
'669',
'707',
'714',
'747',
'760',
'805',
'818',
'820',
'831',
'840',
'858',
'909',
'916',
'925',
'949',
'951',
],
Colorado: ['303', '719', '720', '970'],
Connecticut: ['203', '475', '860', '959'],
Delaware: ['302'],
'District of Columbia': ['202', '771'],
Florida: [
'239',
'305',
'321',
'352',
'386',
'407',
'448',
'561',
'656',
'689',
'727',
'754',
'772',
'786',
'813',
'850',
'863',
'904',
'941',
'954',
],
Georgia: [
'229',
'404',
'470',
'478',
'678',
'706',
'762',
'770',
'912',
'943',
],
Hawaii: ['808'],
Idaho: ['208', '986'],
Illinois: [
'217',
'224',
'309',
'312',
'331',
'447',
'464',
'618',
'630',
'708',
'730',
'773',
'779',
'815',
'847',
'872',
],
Indiana: ['219', '260', '317', '463', '574', '765', '812', '930'],
Iowa: ['319', '515', '563', '641', '712'],
Kansas: ['316', '620', '785', '913'],
Kentucky: ['270', '364', '502', '606', '859'],
Louisiana: ['225', '318', '337', '504', '985'],
Maine: ['207'],
Maryland: ['227', '240', '301', '410', '443', '667'],
Massachusetts: [
'339',
'351',
'413',
'508',
'617',
'774',
'781',
'857',
'978',
],
Michigan: [
'231',
'248',
'269',
'313',
'517',
'586',
'616',
'679',
'734',
'810',
'906',
'947',
'989',
],
Minnesota: ['218', '320', '507', '612', '651', '763', '952'],
Mississippi: ['228', '601', '662', '769'],
Missouri: ['314', '417', '557', '573', '636', '660', '816', '975'],
Montana: ['406'],
Nebraska: ['308', '402', '531'],
Nevada: ['702', '725', '775'],
'New Hampshire': ['603'],
'New Jersey': [
'201',
'551',
'609',
'640',
'732',
'848',
'856',
'862',
'908',
'973',
],
'New Mexico': ['505', '575'],
'New York': [
'212',
'315',
'332',
'347',
'516',
'518',
'585',
'607',
'631',
'646',
'680',
'716',
'718',
'838',
'845',
'914',
'917',
'929',
'934',
],
'North Carolina': [
'252',
'336',
'704',
'743',
'828',
'910',
'919',
'980',
'984',
],
'North Dakota': ['701'],
Ohio: [
'216',
'220',
'234',
'283',
'326',
'330',
'380',
'419',
'440',
'513',
'567',
'614',
'740',
'937',
],
Oklahoma: ['405', '539', '572', '580', '918'],
Oregon: ['458', '503', '541', '971'],
Pennsylvania: [
'215',
'223',
'267',
'272',
'412',
'445',
'484',
'570',
'582',
'610',
'717',
'724',
'814',
'878',
],
'Rhode Island': ['401'],
'South Carolina': ['803', '839', '843', '854', '864'],
'South Dakota': ['605'],
Tennessee: ['423', '615', '629', '731', '865', '901', '931'],
Texas: [
'210',
'214',
'254',
'281',
'325',
'346',
'361',
'409',
'430',
'432',
'469',
'512',
'682',
'713',
'726',
'737',
'806',
'817',
'830',
'832',
'903',
'915',
'936',
'940',
'945',
'956',
'972',
'979',
],
Utah: ['385', '435', '801'],
Vermont: ['802'],
Virginia: ['276', '434', '540', '571', '703', '757', '804', '826', '948'],
Washington: ['206', '253', '360', '425', '509', '564'],
'West Virginia': ['304', '681'],
Wisconsin: ['262', '274', '414', '534', '608', '715', '920'],
Wyoming: ['307'],
};
/**
* Canadian area codes arranged by provice
* source: https://en.wikipedia.org/wiki/List_of_North_American_Numbering_Plan_area_codes
*/
export const CA_AREA_CODES = {
AB: ['368', '403', '587', '780', '825', '867'],
BC: ['236', '250', '604', '672', '778', '867', '907'],
MB: ['204', '431'],
NB: ['428', '506'],
NL: ['709', '879'],
NT: ['867'],
NS: ['782', '902'],
NU: ['867'],
ON: [
'226',
'249',
'289',
'343',
'365',
'382',
'416',
'437',
'519',
'548',
'613',
'647',
'705',
'742',
'807',
'905',
],
PE: ['782', '902'],
QC: ['354', '367', '418', '438', '450', '514', '579', '581', '819', '873'],
SK: ['306', '474', '639'],
YU: ['867'],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment