1001Ferramentas
🇵🇪 Validators

Peruvian RUC Validator

Validate Peruvian RUC (11 digits, mod 11 checksum) — SUNAT Registro Único de Contribuyentes.

Tipos: 10 = Persona Natural · 15/17 = Persona Natural No Domiciliada · 20 = Persona Jurídica. Checksum: peso [5,4,3,2,7,6,5,4,3,2], dígito = (11 − soma%11) %10.

RUC: Peru's 11-digit taxpayer registry number

The RUC (Registro Único de Contribuyentes) is the 11-digit number that identifies every taxpayer in Peru — people and companies alike — administered by SUNAT. The first two digits announce the taxpayer type, and the last digit is a mod-11 check digit. This tool validates the prefix, length and checksum; 20100070970 is a sample company RUC.

For an individual, the RUC is usually their DNI (national ID) prefixed with 10 and given a check digit — so the RUC and DNI are tightly linked for natural persons.

The type prefix

  • 10: persona natural (an individual, typically DNI-based).
  • 15 / 17: persona natural no domiciliada (non-resident individual).
  • 20: persona jurídica (a company/legal entity).
  • Check digit: weights 5,4,3,2,7,6,5,4,3,2 over the first 10, then (11 − sum mod 11) mod 10.

Where it matters

  • Invoicing: every Peruvian factura/boleta electrónica carries the issuer's and buyer's RUC.
  • Tax filing: SUNAT keys all declarations and payments to the RUC.
  • Business checks: the RUC reveals the entity type and tax status (active/suspended).
  • Mock data / testing: validating prefix + checksum before a SUNAT lookup.

Common pitfalls

  • Prefix must be valid: only 10, 15, 17, 20 are accepted types.
  • Checksum ≠ active: a valid RUC can still be a suspended or de-registered taxpayer.
  • Leading digits matter: store as an 11-character string, never an integer.
  • RUC vs DNI: the 8-digit DNI is embedded in a 10-type RUC but isn't the same field.

FAQ

How is the RUC check digit computed? Weights 5,4,3,2,7,6,5,4,3,2 over the first ten digits, then (11 − sum mod 11) mod 10.

What does a 20 prefix mean? A persona jurídica — a registered company or legal entity.

Is an individual's RUC their DNI? Essentially yes — a 10 prefix plus the 8-digit DNI plus a check digit.

Related Tools