Peru RUC Validator
Online Peru RUC validator. Verify SUNAT Modulo 11 weights. QA testing.
About Peru RUC
The RUC is Peru's corporate and individual tax registry code managed by the SUNAT.
This tool generates valid 11-digit RUC numbers using SUNAT weights and prefix logic for testing billing and accounting systems.
Anatomy & Structure of Peruvian RUC (SUNAT)
The 11-digit Peruvian tax identification number comprises 3 sections:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 & 2 | Prefix Category | 2 digits | 10 (Natural Person), 20 (Legal Entity / Corporation), 15/17 (Foreign Resident) | 20 |
| 3 to 10 | Registration Serial | 8 digits | Civil DNI of individual or corporate registration serial | 12345678 |
| 11 (trailing) | Check Digit | 1 digit | Official Modulo 11 check digit using factors [5, 4, 3, 2, 7, 6, 5, 4, 3, 2] | 4 |
Official Peruvian RUC Validation Algorithm (SUNAT Modulo 11)
SUNAT computes the 11th digit using positional weights [5, 4, 3, 2, 7, 6, 5, 4, 3, 2]:
Remainder = (Σ (d[i] × [5, 4, 3, 2, 7, 6, 5, 4, 3, 2][i])) % 11; DV = 11 - Remainder; if DV == 11 -> 0; if DV == 10 -> 1
- 1. Multiply first 10 digits by factors [5, 4, 3, 2, 7, 6, 5, 4, 3, 2].
- 2. Calculate sum of products and remainder modulo 11.
- 3. Value = 11 - Remainder.
- 4. If Value == 11 -> DV = 0; If Value == 10 -> DV = 1; else DV = Value.
- 5. Valid when 11th digit matches DV.