Skip to main content

El Salvador DUI Validator (RNPN)

Validate 9-digit Documento Único de Identidad (DUI) numbers for El Salvador via Modulo 10 check digit.

How does El Salvador DUI validation work?

Validation applies the official Modulo 10 weighted sum algorithm using descending weights 9 down to 2 on the first 8 digits.

Supports both hyphenated format (XXXXXXXX-Y) and raw 9-digit numbers.

DUI Structure

Composed of 9 digits:

PositionFieldLengthMeaningExample
1-8Correlative8 digitsSerial sequence01234567
9Check Digit1 digitModulo 10 check digit8

Modulo 10 Validation Algorithm

RNPN Rules:

DV = (10 - (Sum % 10)) % 10
  1. 1. Weight the first 8 digits with [9, 8, 7, 6, 5, 4, 3, 2].
  2. 2. Calculate Modulo 10.
  3. 3. Compare with 9th digit.

Frequently Asked Questions