International · Peru
Peru DNI and RUC validator.
Enter an 8-digit DNI (with or without its verification character) or an 11-digit RUC. Browser only.
How it works: A Peruvian DNI has 8 digits and a verification character shown after a hyphen: a digit or a letter from the same mod 11 sum with weights 3, 2, 7, 6, 5, 4, 3, 2. A RUC has 11 digits, starts with 10, 15, 17 or 20, and ends in a check digit with weights 5, 4, 3, 2, 7, 6, 5, 4, 3, 2.
Inputs
Test values (not real people’s numbers):
Result
Enter a number and press Check.
How the Peru DNI / RUC check works
A Peruvian DNI has 8 digits and a verification character shown after a hyphen: a digit or a letter from the same mod 11 sum with weights 3, 2, 7, 6, 5, 4, 3, 2. A RUC has 11 digits, starts with 10, 15, 17 or 20, and ends in a check digit with weights 5, 4, 3, 2, 7, 6, 5, 4, 3, 2.
| Number | Calculation |
|---|---|
| DNI | Weight the 8 digits by 3, 2, 7, 6, 5, 4, 3, 2 and add. The sum mod 11 selects the digit from 6 5 4 3 2 1 1 0 9 8 7, or the letter from K J I H G F E D C B A (positions 0 to 10) |
| RUC | Weight the first 10 digits by 5, 4, 3, 2, 7, 6, 5, 4, 3, 2 and add. The check digit is (11 minus sum mod 11) mod 10 |
| Natural-person RUC | Starts with 10, then the 8-digit DNI, then the RUC check digit |
Worked example, DNI 10117410: 1x3 + 0x2 + 1x7 + 1x6 + 7x5 + 4x4 + 1x3 + 0x2 = 70. 70 mod 11 = 4, so the digit is the fifth value of 6 5 4 3 2 1 1 0 9 8 7, which is 2, and the letter is G. The DNI reads 10117410-2 or 10117410-G. The natural-person RUC for that DNI is 10101174102.
What this tool cannot tell you
RENIEC holds the DNI register and SUNAT the RUC register. This tool never contacts either and cannot say whether a number was issued. A passing result means the number is well formed. It does not mean it was issued, is current, or belongs to anyone. Official sources to use instead: RENIEC (gob.pe) and SUNAT.
Where each rule comes from
Not every issuer publishes its check rules. This table says, for each rule used here, who documents it and how firmly.
| Rule | Source | Status |
|---|---|---|
| DNI is 8 digits with a separate verification character | python-stdnum pe/cui, which cites the gob.pe DNI page. That page did not state the digit structure when retrieved, so it is not confirmed against RENIEC. | Documented by third parties, cross-checked |
| DNI weights 3,2,7,6,5,4,3,2 and the digit and letter tables | python-stdnum pe/cui. RENIEC's page checked does not print the formula. | Not published; reverse-engineered |
| RUC 11 digits, prefixes 10/15/17/20, weights 5,4,3,2,7,6,5,4,3,2, check digit (11 - sum mod 11) mod 10 | python-stdnum pe/ruc. SUNAT's own documentation was not retrieved. | Not published; reverse-engineered |
Frequently asked questions
How do I calculate the DNI verification digit?
Enter the 8 digits. The tool weights them by 3, 2, 7, 6, 5, 4, 3, 2, takes the sum mod 11, and shows the matching digit and letter.
How do I validate a RUC number?
Enter all 11 digits. The tool checks the prefix (10, 15, 17 or 20) and recomputes the final check digit from the first ten.
How is a natural-person RUC related to the DNI?
A RUC starting with 10 contains the 8-digit DNI after the prefix, followed by a RUC check digit, so the same person has two related numbers.
Is it safe to enter a DNI here?
The check runs in your browser and nothing is sent, stored or logged. Only enter numbers you are entitled to use.
Sources
- gob.pe, Documento Nacional de Identidad (RENIEC) (retrieved 15 October 2026)
- python-stdnum, stdnum/pe/cui.py (retrieved 15 October 2026)
- python-stdnum, stdnum/pe/ruc.py (retrieved 15 October 2026)
- Wikipedia (Spanish), Documento Nacional de Identidad (Peru) (retrieved 15 October 2026)
Format check only — not an official verification
This tool checks structure and, where a public algorithm exists, a check digit, entirely in your browser. It does not query any government register, and it cannot confirm that a number was issued or to whom. Nothing you type is transmitted, stored or logged.