RG-UF Format Validator
Validate Brazilian RG format with UF (ex: 12.345.678-9/SP).
Brazilian RG (Registro Geral): why the issuing state matters
The RG (Registro Geral) is Brazil's traditional identity-card number. Crucially, it is issued by each state separately — by that state's Secretaria de Segurança Pública (SSP) or institute (IIRGD, Detran, IFP, PCMG…) — not by a federal authority. That is why an RG is not unique nationwide: the same number can be issued in two different states, and a single person can legally hold more than one RG. This tool validates the format/mask plus the two-letter UF suffix (e.g. 12.345.678-9/SP), which is exactly what disambiguates the number.
There is no national check-digit standard. Each state defines its own layout and, where one exists, its own verifying-digit rule — so a format check is the only portable validation. The mask is generally NN.NNN.NNN-D, where the final character D may be a digit or the letter X.
Why pair the RG with a UF
- Disambiguation:
12.345.678-9alone is ambiguous;…/SPvs…/RJidentifies the issuing state. - The issuing body (órgão expedidor): official records pair the RG with both the UF and the issuer code (e.g.
SSP/SP). - Cross-state collisions: data systems that ignore the UF risk merging two different people who share a number.
The CIN is replacing the state-by-state RG
Since 2022–2023 Brazil has been rolling out the CIN (Carteira de Identidade Nacional), which makes the CPF the single national identifier printed on the card and unifies issuance across all states. The legacy state RG numbers remain valid during the transition, but new documents are CPF-keyed — so over time the "which state issued it?" problem disappears.
Gotchas
- Format ≠ checksum: this tool confirms the mask and UF, not a verifying digit (which is state-specific and not universally documented).
- Don't reuse CPF logic: the RG is not the CPF; they have different lengths, algorithms and authorities.
- The X is uppercase: when the final digit is the value 10, SP and some states write
X. - Sensitive PII: use real numbers only with consent; this tool is for format checks and synthetic test data.
FAQ
Can one person have two RGs? Yes — historically, because each state issues independently. The CIN/CPF unification is fixing this.
Is there a check digit for any RG? Some states (notably São Paulo) use a mod-11 verifying digit; many don't publish one. There is no single national algorithm.
Why include the UF here? Because without it the number is incomplete: the UF is what makes a Brazilian RG meaningful across the country.
Related Tools
CPF Validator
Validate Brazilian CPF numbers instantly using the official algorithm. Useful for testing document validation in applications. No data sent to servers.
Batch CPF Validator
Validate a list of CPFs (one per line) and see which are valid and which are not. No data sent to servers.
Batch CNPJ Validator
Validate a list of CNPJs (one per line) with a summary of valid, invalid and total. No data sent to servers.