RG-MG Format Validator
Validate Minas Gerais RG format.
Minas Gerais RG: the MG- prefix that identifies the state on sight
The RG issued in Minas Gerais is produced by the PCMG (Polícia Civil de Minas Gerais) identification institute. Its most recognisable trait is the literal MG prefix printed in front of the number, giving the mask MG-NN.NNN.NNN (the letters MG followed by 8 digits). Because the state is baked into the string itself, an MG RG is self-labelling — you don't need a separate UF field to know where it came from. This tool validates that format/mask.
Like most Brazilian states other than São Paulo, MG does not publish a widely documented public check-digit algorithm, so the dependable, portable validation is structural: the MG prefix plus the eight-digit body in the canonical mask.
Reading MG-12.345.678
MG: the fixed state prefix (case-insensitive on input, canonically uppercase).- Hyphen: a conventional separator between the prefix and the number.
- 8 digits: the registration body, grouped
NN.NNN.NNNwith dots.
Where it shows up
- Onboarding & KYC: MG-issued IDs in banking, telecom and HR forms across the state.
- Public services: PCMG, Detran-MG and state systems reference the RG.
- Self-labelling: the
MGprefix removes ambiguity even when no separate UF field is captured. - Mock data / testing: generating mask-valid MG RGs for form QA and synthetic fixtures.
Gotchas
- Keep the prefix: stripping
MGthrows away the state marker that makes the number unambiguous. - No SP-style checksum: don't apply São Paulo's mod-11 to an MG number — there's no equivalent public spec.
- Eight digits, not nine: the MG mask here has no trailing verifying digit in the captured form.
- CIN transition: new MG identity cards are CPF-keyed under the national CIN; the legacy MG RG stays valid.
FAQ
Why does the MG RG start with letters? The MG prefix encodes the issuing state directly in the number, so it identifies itself without a separate UF field.
Does MG have a check digit? There is no widely documented public algorithm like São Paulo's; format validation is the practical standard.
Is an MG RG valid in other states? It is a national identity document, but the number is issued by and scoped to Minas Gerais — pair it with its issuer (PCMG) in records.
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.