RUC generator (Peru)
A Peruvian RUC is eleven digits — a type prefix (10 = natural person, 20 = company), an eight-digit base, and a MOD-11 check digit. These test values are synthetic but checksum-valid.
Synthetic · not collision-guaranteed Validate a number →
20059926749
Synthetic RUC with a valid check digit. Not a real issued number.
Format specification
| Identifier | Registro Único de Contribuyentes (RUC) |
|---|---|
| Country | 🇵🇪 Peru |
| Format | 00000000000 |
| Length | 11 characters |
| Checksum | MOD 11 |
| Example | 20291363351 |
| Safe strategy | Synthetic |
| Data quality | Verified against sources |
Registro Único de Contribuyentes: what each part means
| 00 | Taxpayer type: 10 = natural person (the next eight digits are their DNI), 20 = legal entity; 15, 16 and 17 cover older registrations. |
|---|---|
| 00000000 | Eight-digit base number (a person’s DNI, or a sequential company number). |
| 0 | Check digit: the first ten digits weighted 5,4,3,2,7,6,5,4,3,2, then (11 − sum mod 11) mod 10. |
Validation regex
Matches the canonical value — strip separators and uppercase first: value.replace(/[^A-Za-z0-9]/g, '').toUpperCase()
^(10|15|16|17|20)\d{9}$ References
Common questions
Will these pass my validation?
Yes — they are well-formed Registro Único de Contribuyentes values (00000000000) and pass standard format checks, including the MOD 11 checksum.
Could one belong to a real person?
These are synthetic values. They are format-valid but not drawn from a guaranteed reserved range, so use them only for testing.
Can I generate many at once?
Increase the count, or use the free API and CSV/JSON export for large datasets.
For software testing only. These numbers are synthetic and must never be used
for real-world identification, applications, or to impersonate anyone.