The most important information you need to know.
See how developers and businesses use our Area Code Database to solve real-world problems.
Route inbound calls based on area code, time zone, or rate center. Implement least-cost routing using carrier and LATA data. Perfect for contact centers, VoIP platforms, and toll-free number management.
Key Fields: NPA, NXX, RateCenter, TimeZone, LATA, Carrier, State
Flag suspicious numbers from inactive NPA-NXX blocks or newly assigned exchanges. Cross-reference carrier data to detect caller ID spoofing. Identify high-risk area codes and verify caller authenticity in real-time authentication systems.
Key Fields: Status, NXXIntroVersion, Company, OCN, State
Validate phone numbers in web forms, CRM imports, or batch processing pipelines. Verify area code/exchange combinations exist before attempting delivery. Reduce bounce rates and improve data quality in customer databases.
Key Fields: NPANXX, NPA, NXX, State, Status
Append geographic location, carrier information, and service type to existing customer phone numbers. Enhance marketing segmentation with wireless/landline classification. Fill gaps in incomplete customer records with ZIP code correlations.
Key Fields: City, County, State, ZipCode, NXXUseType, Company
Schedule outbound calls during appropriate business hours based on phone number time zones. Respect DST observance for Arizona and Hawaii. Optimize contact center staffing by predicting call volume across time zones.
Key Fields: TimeZone, ObservesDST, State, RateCenter
Analyze call patterns by region, carrier type, or service area. Track number pool assignments over time using historical status data. Generate market intelligence reports on telecom infrastructure and carrier distribution.
Key Fields: OCN, Company, MSA_CBSA, County, NXXUseType, Status
Route emergency calls to appropriate dispatch centers using rate center and county data. Determine jurisdiction boundaries for 911 call handling. Support VoIP E911 compliance requirements with accurate geographic attribution.
Key Fields: RateCenter, County, State, FIPS, Latitude, Longitude
Identify wireless numbers before calling to comply with TCPA regulations. Maintain proper consent records for mobile marketing campaigns. Reduce legal risk by classifying phone types before outbound marketing activities.
Key Fields: NXXUseType, State, Status
Target marketing campaigns by geographic region using area code intelligence. Display local phone numbers to visitors based on their location. Optimize service coverage by mapping customer density to rate centers and MSAs.
Key Fields: State, City, County, MSA_CBSA, ZipCode, Latitude, Longitude
Real code examples showing how to use the Area Code Database in your applications. Each example demonstrates phone number validation with NPA-NXX lookup.
Download Complete Code Samples →
import csv
# Load NPA-NXX database into memory (do this once at startup)
# For production: consider using a database or caching layer
npanxx_lookup = {}
with open('npanxx_deluxe.csv', 'r', encoding='utf-8') as f:
    reader = csv.DictReader(f)
    for row in reader:
        npanxx_lookup[row['NPANXX']] = row
def validate_phone(phone_number):
    """
    Validate a 10-digit phone number and return location/carrier info.
    Returns dict with validation result and metadata.
    """
    # Extract first 6 digits (NPA-NXX)
    # Production tip: add input sanitization for (555) 123-4567 format
    npanxx = phone_number.replace('-', '').replace('(', '').replace(')', '')[:6]
    
    if npanxx in npanxx_lookup:
        data = npanxx_lookup[npanxx]
        return {
            'valid': True,
            'npanxx': npanxx,
            'state': data['State'],
            'city': data.get('City', 'N/A'),  # Deluxe only
            'timezone': data.get('TimeZone', 'N/A'),  # Deluxe only
            'carrier': data.get('Company', 'N/A'),  # Deluxe only
            'type': 'Wireless' if data.get('NXXUseType') == 'W' else 'Landline',
            'active': data.get('Status') == 'Active'
        }
    
    return {'valid': False, 'npanxx': npanxx, 'error': 'Invalid NPA-NXX combination'}
# Example usage
result = validate_phone('2125551234')
print(f"Valid: {result['valid']}")
if result['valid']:
    print(f"Location: {result['city']}, {result['state']}")
    print(f"Carrier: {result['carrier']}")
    print(f"Type: {result['type']}")
                        <?php
// Load NPA-NXX database (cache this in production using APCu/Redis)
// For production: use database or persistent cache instead of loading CSV each time
$npanxxLookup = [];
if (($handle = fopen('npanxx_deluxe.csv', 'r')) !== false) {
    $headers = fgetcsv($handle);
    while (($row = fgetcsv($handle)) !== false) {
        $data = array_combine($headers, $row);
        $npanxxLookup[$data['NPANXX']] = $data;
    }
    fclose($handle);
}
function validatePhone($phoneNumber, $npanxxLookup) {
    // Extract first 6 digits (NPA-NXX)
    // Production tip: use preg_replace for robust phone formatting
    $npanxx = substr(preg_replace('/[^0-9]/', '', $phoneNumber), 0, 6);
    
    if (isset($npanxxLookup[$npanxx])) {
        $data = $npanxxLookup[$npanxx];
        return [
            'valid' => true,
            'npanxx' => $npanxx,
            'state' => $data['State'],
            'city' => $data['City'] ?? 'N/A',  // Deluxe only
            'timezone' => $data['TimeZone'] ?? 'N/A',  // Deluxe only
            'carrier' => $data['Company'] ?? 'N/A',  // Deluxe only
            'type' => ($data['NXXUseType'] ?? '') === 'W' ? 'Wireless' : 'Landline',
            'active' => ($data['Status'] ?? '') === 'Active'
        ];
    }
    
    return ['valid' => false, 'npanxx' => $npanxx, 'error' => 'Invalid NPA-NXX combination'];
}
// Example usage
$result = validatePhone('(212) 555-1234', $npanxxLookup);
echo "Valid: " . ($result['valid'] ? 'Yes' : 'No') . "\n";
if ($result['valid']) {
    echo "Location: {$result['city']}, {$result['state']}\n";
    echo "Carrier: {$result['carrier']}\n";
    echo "Type: {$result['type']}\n";
}
?>
                        const fs = require('fs');
const csv = require('csv-parser');  // npm install csv-parser
// Load NPA-NXX database (do this once at module load)
// For production: consider using a database or Redis cache
const npanxxLookup = new Map();
fs.createReadStream('npanxx_deluxe.csv')
  .pipe(csv())
  .on('data', (row) => {
    npanxxLookup.set(row.NPANXX, row);
  })
  .on('end', () => {
    console.log(`Loaded ${npanxxLookup.size} NPA-NXX records`);
  });
function validatePhone(phoneNumber) {
  // Extract first 6 digits (NPA-NXX)
  // Production tip: add input validation and normalization
  const npanxx = phoneNumber.replace(/\D/g, '').substring(0, 6);
  
  if (npanxxLookup.has(npanxx)) {
    const data = npanxxLookup.get(npanxx);
    return {
      valid: true,
      npanxx: npanxx,
      state: data.State,
      city: data.City || 'N/A',  // Deluxe only
      timezone: data.TimeZone || 'N/A',  // Deluxe only
      carrier: data.Company || 'N/A',  // Deluxe only
      type: data.NXXUseType === 'W' ? 'Wireless' : 'Landline',
      active: data.Status === 'Active'
    };
  }
  
  return { valid: false, npanxx, error: 'Invalid NPA-NXX combination' };
}
// Example usage (wrap in async or use callbacks after CSV loads)
setTimeout(() => {
  const result = validatePhone('212-555-1234');
  console.log('Valid:', result.valid);
  if (result.valid) {
    console.log(`Location: ${result.city}, ${result.state}`);
    console.log(`Carrier: ${result.carrier}`);
    console.log(`Type: ${result.type}`);
  }
}, 1000);  // Wait for CSV to load
                        -- First, import the CSV into your database
-- MySQL example: LOAD DATA INFILE 'npanxx_deluxe.csv' 
--                INTO TABLE npanxx FIELDS TERMINATED BY ',' 
--                ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS;
-- Create indexed table for fast lookups
CREATE TABLE npanxx (
    NPANXX CHAR(6) PRIMARY KEY,
    NPA CHAR(3),
    NXX CHAR(3),
    State CHAR(2),
    City VARCHAR(100),
    County VARCHAR(100),
    TimeZone TINYINT,
    ObservesDST CHAR(1),
    NXXUseType CHAR(1),
    Company VARCHAR(255),
    OCN VARCHAR(10),
    Status VARCHAR(20),
    -- Add other fields as needed
    INDEX idx_npa (NPA),
    INDEX idx_state (State)
);
-- Validate a single phone number
SELECT 
    NPANXX,
    State,
    City,
    Company AS Carrier,
    CASE WHEN NXXUseType = 'W' THEN 'Wireless' ELSE 'Landline' END AS Type,
    CASE WHEN Status = 'Active' THEN 1 ELSE 0 END AS IsActive,
    TimeZone
FROM npanxx
WHERE NPANXX = SUBSTRING(REPLACE(REPLACE(REPLACE('(212) 555-1234', '-', ''), '(', ''), ')', ''), 1, 6);
-- Enrich existing customer table with area code data
UPDATE customers c
INNER JOIN npanxx n ON SUBSTRING(c.phone, 1, 6) = n.NPANXX
SET 
    c.phone_state = n.State,
    c.phone_city = n.City,
    c.phone_timezone = n.TimeZone,
    c.phone_carrier = n.Company,
    c.phone_type = CASE WHEN n.NXXUseType = 'W' THEN 'Wireless' ELSE 'Landline' END
WHERE c.phone IS NOT NULL;
                        using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using CsvHelper;  // Install-Package CsvHelper
using System.Globalization;
public class NpanxxValidator
{
    private Dictionary<string, NpanxxRecord> _lookup;
    
    public NpanxxValidator(string csvPath)
    {
        // Load NPA-NXX database (do this once at application startup)
        // For production: consider using SQL Server or cache layer
        _lookup = new Dictionary<string, NpanxxRecord>();
        
        using (var reader = new StreamReader(csvPath))
        using (var csv = new CsvReader(reader, CultureInfo.InvariantCulture))
        {
            var records = csv.GetRecords<NpanxxRecord>();
            foreach (var record in records)
            {
                _lookup[record.NPANXX] = record;
            }
        }
    }
    
    public ValidationResult ValidatePhone(string phoneNumber)
    {
        // Extract first 6 digits (NPA-NXX)
        // Production tip: use Regex for robust phone number parsing
        string npanxx = new string(phoneNumber.Where(char.IsDigit).Take(6).ToArray());
        
        if (_lookup.TryGetValue(npanxx, out var data))
        {
            return new ValidationResult
            {
                Valid = true,
                Npanxx = npanxx,
                State = data.State,
                City = data.City ?? "N/A",  // Deluxe only
                Timezone = data.TimeZone ?? "N/A",  // Deluxe only
                Carrier = data.Company ?? "N/A",  // Deluxe only
                Type = data.NXXUseType == "W" ? "Wireless" : "Landline",
                Active = data.Status == "Active"
            };
        }
        
        return new ValidationResult 
        { 
            Valid = false, 
            Npanxx = npanxx, 
            Error = "Invalid NPA-NXX combination" 
        };
    }
}
// Example usage
var validator = new NpanxxValidator("npanxx_deluxe.csv");
var result = validator.ValidatePhone("(212) 555-1234");
Console.WriteLine($"Valid: {result.Valid}");
if (result.Valid)
{
    Console.WriteLine($"Location: {result.City}, {result.State}");
    Console.WriteLine($"Carrier: {result.Carrier}");
    Console.WriteLine($"Type: {result.Type}");
}
                        import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class NpanxxValidator {
    private Map<String, NpanxxRecord> lookup;
    
    public NpanxxValidator(String csvPath) throws IOException {
        // Load NPA-NXX database (do this once at application startup)
        // For production: consider using a database or cache layer like Redis
        lookup = new HashMap<>();
        
        try (BufferedReader br = new BufferedReader(new FileReader(csvPath))) {
            String line;
            String[] headers = br.readLine().split(",");  // Skip header row
            
            while ((line = br.readLine()) != null) {
                String[] values = line.split(",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)");  // Handle quoted commas
                NpanxxRecord record = new NpanxxRecord(headers, values);
                lookup.put(record.getNpanxx(), record);
            }
        }
    }
    
    public ValidationResult validatePhone(String phoneNumber) {
        // Extract first 6 digits (NPA-NXX)
        // Production tip: use Pattern/Matcher for robust phone formatting
        String npanxx = phoneNumber.replaceAll("[^0-9]", "").substring(0, 6);
        
        if (lookup.containsKey(npanxx)) {
            NpanxxRecord data = lookup.get(npanxx);
            return new ValidationResult(
                true,
                npanxx,
                data.getState(),
                data.getCity() != null ? data.getCity() : "N/A",  // Deluxe only
                data.getTimeZone() != null ? data.getTimeZone() : "N/A",  // Deluxe only
                data.getCompany() != null ? data.getCompany() : "N/A",  // Deluxe only
                "W".equals(data.getNxxUseType()) ? "Wireless" : "Landline",
                "Active".equals(data.getStatus())
            );
        }
        
        return new ValidationResult(false, npanxx, "Invalid NPA-NXX combination");
    }
    
    // Example usage
    public static void main(String[] args) throws IOException {
        NpanxxValidator validator = new NpanxxValidator("npanxx_deluxe.csv");
        ValidationResult result = validator.validatePhone("(212) 555-1234");
        
        System.out.println("Valid: " + result.isValid());
        if (result.isValid()) {
            System.out.println("Location: " + result.getCity() + ", " + result.getState());
            System.out.println("Carrier: " + result.getCarrier());
            System.out.println("Type: " + result.getType());
        }
    }
}
                        These examples show basic validation. For complete implementations including CSV import, batch processing, and production-ready error handling, visit our technical documentation.
Quick answers to common questions about our Area Code Database. Have Tech questions? See the full Technical FAQ.
Each edition offers different levels of data depth:
NPA-NXX (also called NPANXX or Area Code Database) represents North American telephone numbering assignments. NPA is the 3-digit area code (like 212), and NXX is the 3-digit exchange prefix (like 555). Together they identify the first 6 digits of a 10-digit phone number and determine its geographic location, carrier, and routing information.
This data is essential for:
Unlike individual phone number lookups, NPA-NXX data gives you the infrastructure intelligence behind the North American telephone network-no per-query fees, no rate limits, just complete control over your routing and validation logic.
Every purchase includes 12 months of quarterly updates at no additional cost. Four times per year, we synchronize with NANPA updates and release a fresh version of the complete database. Each update is a full file refresh-not incremental deltas-ensuring data consistency.
Access your updates two ways:
After 12 months, you keep all the data you've downloaded. Renewal is only needed if you want to continue receiving quarterly updates.
Timing: Updates are typically released mid-quarter (January, April, July, October). We send email notifications to all active subscribers when new releases are available.
Yes! You can upgrade at any time by simply paying the price difference. Your subscription end date remains the same, and you'll immediately get access to the additional 19 data fields in the Deluxe edition.
For example, if you purchased Standard ($249.95) and want to upgrade to Deluxe ($449.95), you'd pay $200 (the difference), and your 12-month update period stays unchanged. This is accessible directly from your Account Homepage. It will list all of your subscriptions and offer an immediate upgrade option. No waiting, the upgrade is instantaneous. Contact us if you have any further questions.
Every subscription includes:
You keep the data forever: After your subscription ends, you retain all downloaded files. Renewal is only required if you want continued quarterly updates.
Need redistribution rights? We offer separate licensing for embedding data in commercial products. Select Edition to see Redistribution pricing →
ZIP code boundaries and telephone exchange boundaries don't align perfectly-they were designed for different purposes (postal delivery vs. telecom infrastructure). Our database includes ZipCodeFreq rankings to show which ZIP codes are most commonly associated with each NPA-NXX:
We also include ZipCodeCount (population estimate) to help you assess reliability. ZIP codes with less than 2% frequency are excluded as statistically insignificant.
Best practices: For precise applications, use the -1 ranked ZIP codes, which represent the primary service area. For comprehensive coverage, include -2 ranked codes as well. The combination provides excellent geographic attribution for most business applications.
Our database is derived directly from NANPA (North American Numbering Plan Administration)-the official authority for area code and exchange assignments. This is the same authoritative source used by all telecom carriers in North America.
Our quality process:
Accuracy considerations: While NANPA assignment data is definitive, some fields reflect point-in-time snapshots. Carrier assignments can change (especially with number portability), and new NPA-NXX blocks are issued monthly. Our quarterly updates keep you current within a 3-month window, which is sufficient for most business applications.
Bottom line: For NPA-NXX assignments, geographic locations, and rate center data, this is the most authoritative source available outside of direct carrier records.
The NXXUseType field (L=Landline, W=Wireless) is derived from NANPA's official assignments and reflects the original carrier type when the NPA-NXX block was assigned. This data is accurate at the block level.
Important caveats:
Best uses:
For critical applications requiring definitive real-time wireless/landline identification (like TCPA compliance), consider supplementing with a real-time lookup service that checks current line type and portability status.
Rate centers are geographic boundaries originally created to determine local calling areas and billing zones. Each NPA-NXX is assigned to a specific rate center, which defines its "home" location within the telephone network.
Why rate centers still matter:
Common applications:
Available in: Deluxe edition only. Standard edition does not include rate center assignments.
The Status field indicates whether an NPA-NXX combination is currently in service:
Why we include inactive records:
Best practices:
Status='Active' onlyAvailable in: Deluxe edition only. Standard edition does not include status tracking.
OCN (Operating Company Number) is a unique 4-character identifier assigned by NECA (National Exchange Carrier Association) to each telecommunications carrier. The Company field shows the human-readable carrier name.
Key differences:
| Attribute | OCN | Company Name | 
|---|---|---|
| Format | 4 characters (e.g., "9206") | Variable text (e.g., "Verizon New Jersey, Inc.") | 
| Uniqueness | One OCN = One carrier entity | Names may have variations | 
| Stability | Rarely changes | Can change with rebranding | 
| Best for | Database keys, joins, matching | User display, reporting | 
Practical usage:
Example: Verizon has multiple OCNs for different regions (9206 for New Jersey, 9740 for Pennsylvania). OCN distinguishes these entities while company names might appear similar.
Every purchase includes all three formats at no additional cost:
Database compatibility:
LOAD DATA INFILE for fast CSV importsCOPY command for efficient bulk loadingBULK INSERT or Import/Export Wizard.import commandAll formats contain identical data-choose based on your import workflow and tooling preferences. Download all three formats if you want flexibility.
Yes! For validation of area code + exchange (first 6 digits), this database is perfect. Simply extract the first 6 digits (NPA-NXX) from any phone number and look it up.
What you can validate:
Validation example:
Phone: (212) 555-1234
Extract: 212555
Lookup: NPA=212, NXX=555
Result: Valid block, New York City, Landline, Verizon
                                    Important limitations:
Performance: With proper database indexing on NPANXX or (NPA, NXX) columns, lookups complete in milliseconds. Perfect for real-time validation in web forms or batch processing millions of records.
Yes! Our data works with any system that can import CSV, TAB, or MDB files. The data is normalized, consistently formatted, and ready for production use.
Common integration patterns:
Integration example (SQL):
-- Enrich customer table with area code data
UPDATE customers c
JOIN npanxx n ON SUBSTRING(c.phone, 1, 6) = n.NPANXX
SET c.phone_state = n.State,
    c.phone_timezone = n.TimeZone,
    c.phone_carrier = n.Company;
                                    Implementation time: Most customers complete initial integration in under a day. The standardized format eliminates parsing complexity.
Bonus: Many customers combine our Area Code Database with our ZIP Code Database for complete geographic and demographic intelligence-join on the ZIP code field to enrich phone data with Census information and precise coordinates.
We offer two update delivery methods for your convenience:
1. Automated FTP/SFTP/FTPS (Recommended for production):
2. Manual download from your account:
Update strategy recommendations:
-- MySQL example
RENAME TABLE 
  npanxx_active TO npanxx_backup,
  npanxx_new TO npanxx_active;
                                        Import tips: Use your database's native CSV import tools (MySQL's LOAD DATA INFILE, PostgreSQL's COPY, SQL Server's BULK INSERT). The CSV format is standardized and imports cleanly into all major databases. Index on NPANXX, NPA, NXX, State, and ZipCode fields for optimal query performance.
It depends on how you're using the data:
Standard subscription is sufficient if you're:
You need a redistribution license if you're:
Redistribution license benefits:
Still unsure? Contact us with your use case-we'll help determine which license type you need. We want you to use the data confidently and compliantly.
We offer a 30-day, no-questions-asked money-back guarantee. If the data doesn't meet your needs for any reason, just contact us within 30 days of purchase for a full refund.
Why we're confident offering this:
No risk, no hassle. We stand behind our data quality because we know it works. Try it risk-free and see for yourself why thousands of customers trust ZIP-Codes.com for their telecom data needs.
While NANPA provides raw assignment files for free, our database offers production-ready enhancements that save you significant time and effort:
| Feature | Free NANPA Files | Our Database | 
|---|---|---|
| Data Format | Pipe-delimited text files requiring custom parsing | Clean CSV, TAB, and MDB formats-import in minutes | 
| ZIP Code Correlations | Not provided | ZIP code matching with frequency rankings and population data | 
| Geographic Enrichments | Basic assignment data only | Coordinates, time zones, DST flags, county data, MSA/CBSA mapping (Deluxe) | 
| Maintenance | You download, process, normalize, and QA every quarter | We handle all updates, corrections, quality assurance, and formatting | 
| Data Cleaning | Raw data with inconsistencies | Normalized, validated, and production-ready | 
| Historical Tracking | Current snapshot only | Status tracking (Active/Inactive), version history, change documentation | 
| Support | No implementation help | Email and phone support for integration questions | 
| Delivery | Manual download from government site | Instant download + optional automated FTP/SFTP delivery | 
Time savings: Most customers report saving 8-12 hours per quarter compared to processing NANPA files manually. That's parsing pipe-delimited formats, handling encoding issues, normalizing carrier names, adding geographic references, validating data integrity, and building import scripts.
The bottom line: NANPA data is authoritative, but it's raw infrastructure data designed for carriers, not developers. We transform it into production-ready intelligence with the enrichments and formatting your applications actually need.
Your choice: Spend hours every quarter wrestling with government data formats, or spend $249-$449 annually and focus on building your application. Explore our live data to see the difference.
James Harris
Lead Data Architect - 23 Years Experience
Good data doesn't just happen - it takes real people who care about getting things right. James and our team manually verify every source. No running scripts and calling it done. We maintain high standards because you're counting on this data to run your business.
When something doesn't look right, we dig into it. That's the difference experience makes.
More About Our Team →
                    Our mission: Provide the most accurate, comprehensive, and trustworthy ZIP Code data in the industry - so you can make confident business decisions based on reliable intelligence.
Since 2003, we have maintained 99.9% accuracy through rigorous verification, expert curation, and committment to data quality.
We believe that good data matters, and so does good service. When you need help, you'll talk to an actual person - not a ticket system or an endless email thread. Call us and we'll pick up the phone. Email us, and we will respond promptly. It's a simple thing, but it makes a difference when you're on a deadline or troubleshooting an issue.
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                Our sources include trusted federal data from NANPA (North American Numbering Plan Administration), USPS ZIP Code data, Canada Post postal code data, and proprietary data enhancements created by ZIP-Codes.com. Data last updated on October28, 2025.
NANPA Data: NPA-NXX assignment data is derived from official NANPA (North American Numbering Plan Administration) records. NANPA is responsible for the administration and assignment of area codes and central office codes throughout the North American Numbering Plan. This database is independently compiled and is not affiliated with or endorsed by NANPA.
USPS Data: ZIP Code™ is a trademark of the United States Postal Service. ZIP Code correlation data is derived from publicly available USPS geographic information.
Canada Post Data: Postal Code™ is a trademark of Canada Post Corporation. Canadian reference data is used in accordance with applicable licensing terms.