1001Ferramentas
☎️Validators

Brazilian DDD Validator

Validate Brazilian DDD area code (2 digits) and show region.

Brazilian area codes (DDD): regional identifiers of the National Numbering Plan

The Brazilian DDD (Discagem Direta a Distancia, "direct distance dialing") is the two-digit area code prefixing every long-distance call inside Brazil. It identifies a geographic region, not an operator or a service type. While the 9xxxx-xxxx mobile prefix or the 2xxx/3xxx landline prefix tells you what kind of line you are calling, the DDD pins it to a specific cluster of municipalities inside one state — or in some cases a single state spread across several DDDs.

This validator focuses exclusively on the regional, area-code dimension: it checks whether the two digits fall within the 11 to 99 numeric range, whether the combination is actually assigned (some pairs like 20, 23, 25, 26, 29, 30, 36, 39, 40, 50, 52, 56, 57, 58, 59, 60, 70, 72, 76, 78, 80 and 90 are reserved or unassigned) and which state and metropolitan region the code maps to. It does not validate the subscriber number itself — for the mobile portion see the Anatel mobile validator.

Format and validation rules

A Brazilian DDD has a rigid format that any parser can describe in a few lines:

  • Exactly two decimal digits, no separators or letters.
  • First digit between 1 and 9 — codes starting with 0 are reserved for operator selection (0XX prefix).
  • Second digit between 1 and 9 — codes ending in 0 are largely unused (only special service prefixes use the X0 form).
  • Resulting integer range: 11 to 99, but only roughly 67 of the 89 pairs are actually allocated to geographic areas.

A safe regex for the numeric form is ^[1-9][1-9]$; for the dialed long-distance form ^0?\d{2}\s?[1-9]\d{7,8}$ covers landlines and the modern 9-digit mobile.

Complete area code table per state

The geographic assignments below follow the current Plano de Numeracao maintained by Anatel. Large states are split among multiple codes to keep each numbering pool below 10 million subscribers.

Southeast region

  • Sao Paulo (SP) — 11 capital and Greater Sao Paulo, 12 Vale do Paraiba and Sao Jose dos Campos, 13 Baixada Santista, 14 Bauru, 15 Sorocaba and Itapetininga, 16 Ribeirao Preto, 17 Sao Jose do Rio Preto, 18 Presidente Prudente, 19 Campinas.
  • Rio de Janeiro (RJ) — 21 capital and Baixada Fluminense, 22 Norte and Noroeste Fluminense (Campos dos Goytacazes), 24 Sul Fluminense and Volta Redonda.
  • Espirito Santo (ES) — 27 Vitoria and Grande Vitoria, 28 Sul Capixaba (Cachoeiro de Itapemirim).
  • Minas Gerais (MG) — 31 Belo Horizonte, 32 Juiz de Fora, 33 Governador Valadares, 34 Uberlandia and Triangulo, 35 Varginha and Pocos de Caldas, 37 Divinopolis, 38 Montes Claros and Norte de Minas.

South region

  • Parana (PR) — 41 Curitiba, 42 Ponta Grossa, 43 Londrina, 44 Maringa, 45 Cascavel and Foz do Iguacu, 46 Pato Branco and Sudoeste.
  • Santa Catarina (SC) — 47 Joinville, Blumenau and Norte (split from 48 in 1995), 48 Florianopolis and Sul, 49 Chapeco and Oeste.
  • Rio Grande do Sul (RS) — 51 Porto Alegre and Grande POA, 53 Pelotas and Sul, 54 Caxias do Sul and Serra Gaucha, 55 Santa Maria and Centro.

Center-West, North, Northeast

  • Center-West: 61 Distrito Federal and Brasilia (plus parts of GO), 62 Goiania, 64 Rio Verde and Sul de Goias, 65 Cuiaba, 66 Rondonopolis and Sinop, 67 Campo Grande and todo MS.
  • North: 63 Palmas (TO), 68 Rio Branco (AC), 69 Porto Velho and todo RO, 91 Belem and Nordeste do PA, 92 Manaus and parte do AM, 93 Santarem and Oeste do PA, 94 Maraba and Sudeste do PA, 95 Boa Vista (RR), 96 Macapa (AP), 97 Tabatinga and Sudoeste do AM.
  • Northeast: 71 Salvador, 73 Itabuna and Sul da Bahia, 74 Juazeiro and Norte, 75 Feira de Santana, 77 Barreiras e Oeste; 79 Aracaju (SE); 82 Maceio (AL); 83 Joao Pessoa (PB); 81 Recife and 87 Petrolina/Sertao (PE); 84 Natal (RN); 85 Fortaleza and 88 Juazeiro do Norte (CE); 86 Teresina and 89 Sul do PI; 98 Sao Luis and 99 Imperatriz (MA).

Origins: from 1958 to the 9th-digit reform

The numbering plan that introduced DDD codes was sketched in the late 1950s under the original Plano Continental de Numeracao Telefonica (volumes Sul, Centro and Norte were published between 1958 and the mid 1960s). The plan was inspired by the North American Number Plan Area (NPA) but adapted to Brazilian state borders and the political reality of multiple state operators that would later be unified under Telebras in 1972.

DDD adoption rolled out city by city through the 1970s and was fully consolidated in the 1980s. After the 1998 telecom privatization, Anatel (Agencia Nacional de Telecomunicacoes) took over the numbering plan and has issued periodic Atos to create new codes (47 SC in 1995, 28 ES in 2006, 22 RJ split in 2000) or to add the leading 9 to all mobile numbers — a reform completed nationwide in 2016, raising mobile subscriber numbers from 8 to 9 digits and freeing 200 million additional combinations per DDD.

Portability, VoIP and operator selection (CSP)

Since 2008 Brazil has full number portability: a subscriber may switch operator without changing the DDD or the subscriber number. However, portability is strictly within the same DDD. If you move from Curitiba (41) to Sao Paulo (11), you cannot port your 41 number to 11 — you must request a new line. This is why a 11 mobile in your contact list does not guarantee the person lives in Sao Paulo today; it only guarantees they activated the line under the 11 area at some point.

VoIP services (3CX, Twilio, Zenvia, Vono) can offer non-geographic numbers under the 4003, 4004 ranges or true geographic DDDs purchased from Anatel auctions. They obey the same numeric format but the physical location of the user can be anywhere in the world. For long-distance, callers select the carrier via the CSP (Codigo de Selecao de Prestadora) — a two-digit code between the 0 and the DDD, e.g. 0 21 11 99999-9999 routes via Embratel.

FAQ

If I move from Sao Paulo to Rio, does my DDD change?

Yes, but only if you request a new line. Portability is restricted to the same DDD, so a move between regions implies giving up the old number and getting a new one under the destination DDD. Operators may keep your account active under the old number for a transitional period.

Can a single city have more than one DDD?

No — each municipality is assigned to exactly one DDD. However, a single DDD usually covers hundreds of municipalities. For example, code 11 covers Sao Paulo plus 38 cities in the Regiao Metropolitana de Sao Paulo. Code 31 covers Belo Horizonte and most of central Minas Gerais.

Why are codes like 20, 23, 50 not on the list?

Those pairs are reserved by Anatel for future expansion, special services or were never allocated. Codes ending in 0 are mostly unused because the original 1958 plan defined the trailing 0 as a reserved digit for operator and emergency services routing.

Is the DDD enough to identify the operator?

No. The DDD identifies geography; the operator is identified by the subscriber prefix (the first digits after the DDD) combined with portability databases maintained by ABR Telecom. Two numbers sharing the DDD 11 may belong to Vivo, Claro, TIM or any VoIP provider, depending on portability history.

How are new DDDs created?

When a numbering pool exhausts (less than 5% of free combinations), Anatel issues an Ato creating a new code or splitting an existing region. Subscribers in the affected area receive at least 6 months notice. The split of SC into 47/48/49 in 1995 is the canonical example.

Related Tools