Remainder 1 becomes X
- Input
- base 44415890
- Expected output
- 44.415.890-X
Weighted sum 199, remainder of the division by 11 equal to 1, 11 minus 1 closes at 10, which the rule writes as X.
Brazilian RG SSP/SP check-digit validation rules
RG stands for Registro Geral, but Brazil has no single national RG: each state issues and validates its own number. This page describes the algorithm this generator implements, the modulo-11 pattern used by the SSP/SP convention, with a full calculation that closes from the first digit to the last, for anyone who needs to reimplement the validation elsewhere.
Weighted sum 199, remainder of the division by 11 equal to 1, 11 minus 1 closes at 10, which the rule writes as X.
Weighted sum 72, since only the digit 8 in the last position carries weight 9, remainder 6, 11 minus 6 closes at 5, the most common case among the eleven possible remainders.
Weighted sum 0, remainder 0, 11 minus 0 would give 11, which the rule replaces with 0 instead of writing two digits.
No. The RG is issued by state agencies and there is no single national algorithm comparable to the CPF's. Each Public Security Secretariat uses its own format and rule, so a number valid in one state may make no sense in another.
Multiply each of the 8 base digits by its position weight, from 2 to 9 left to right, sum the eight products and divide by 11. If the remainder is 1, the digit is X; if it is 0, the digit is 0; for any other remainder, the digit is 11 minus the remainder.
Because the calculation can result in 10, and there is no single numeric character for ten; the SSP/SP convention writes X in that case, the same way the CPF and other Brazilian documents using modulo 11 handle similar situations.
No. RG is a state-level document, issued by the Secretaria de Segurança Pública or an equivalent body in each state, with no single national standard for numbering or check digits; this page specifically describes the SSP/SP convention, which is the one this generator implements.
No, validating the check digit only confirms internal arithmetic consistency of the number, never existence in a state registry, document status or a person's identity; it is a format check, not an official lookup.
Generation happens locally in the browser. Analytics receives only action, status, type and format, never the generated RG.