Free telecom & identity tools
Free tool
Brazil RG Generator & Validator (São Paulo)
Generate valid test RG numbers (Registro Geral) — the state-issued identity card number — using the São Paulo SSP-SP check-digit rule, or paste an RG to check its digit. Other states run their own, unpublished schemes and are not covered here.
RG Generator
The eight-digit registration number is random; the check digit is calculated with São Paulo's SSP-SP weighted modulo-11 formula.
RG Validator (São Paulo)
Paste a 9-character São Paulo RG, with or without punctuation, to check its check digit. This only checks the SSP-SP formula — an RG from another state can fail here and still be genuine.
Every RG this tool produces is synthetic test data only. It is not issued by any Secretaria de Segurança Pública and does not belong to any real person. Use it on your own test systems only — never on a real form, registration or KYC check.
How a São Paulo RG number is structured
A São Paulo RG is nine characters: an eight-digit registration number and one check digit. Taking 24.678.131-2 as an example:
| Digits | Segment | Meaning |
|---|---|---|
| 24678131 | Registration number | Eight sequential digits issued by SSP-SP. |
| 2 | Check digit | Weighted sum with weights 2 3 4 5 6 7 8 9 over the eight digits, then 11 minus the remainder modulo 11; a result of 11 is written 0 and 10 is written X. |
RG is a state-issued document: each state's own Secretaria de Segurança Pública (SSP) runs its own numbering and its own check-digit rule, and most of those rules are not published. São Paulo's SSP-SP formula above is the one that is publicly documented, which is why this tool is limited to it.
The national identity card that has been rolling out since 2022, the CIN (Carteira de Identidade Nacional), replaces the patchwork of state RG numbers with a single document — but rather than mint a new number of its own, it prints the holder's CPF as the document number, so RG is gradually being superseded rather than reissued.
Why generate test RG numbers?
Onboarding forms and document-capture flows in Brazil often ask for an RG alongside a CPF, particularly for older accounts and physical-document verification. Testing those flows needs input that looks and checks out like a real RG.
Using a real person's RG in a test environment is a privacy problem under LGPD, since an RG is personal data tied to a named individual. Synthetic numbers that pass the SSP-SP checksum let you exercise format checks and validation logic without any real identity document data leaving production.
