Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1 & 2Prefix Category2 digits10 (Natural Person), 20 (Legal Entity / Corporation), 15/17 (Foreign Resident)20
3 to 10Registration Serial8 digitsCivil DNI of individual or corporate registration serial12345678
11 (trailing)Check Digit1 digitOfficial 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. 1. Multiply first 10 digits by factors [5, 4, 3, 2, 7, 6, 5, 4, 3, 2].
  2. 2. Calculate sum of products and remainder modulo 11.
  3. 3. Value = 11 - Remainder.
  4. 4. If Value == 11 -> DV = 0; If Value == 10 -> DV = 1; else DV = Value.
  5. 5. Valid when 11th digit matches DV.

Frequently Asked Questions