What is the Chilean RUT?
The RUT (Unique Tax Roll) is the unique identifier for individuals and companies in Chile, assigned by the Internal Revenue Service (SII). It has 7 to 8 digits plus a check digit that can be a number (0-9) or the letter K.
The standard format is XX.XXX.XXX-X (e.g., 12.345.678-5), but it's also accepted without dots: 12345678-5. The hyphen before the check digit is mandatory in official documents, though many systems accept it without formatting.
This validator verifies the check digit is correct according to the modulo 11 algorithm, but does not query the SII if the RUT is registered or active. It's useful for web forms, electronic invoicing systems (SII), and data validation in databases.
How the validation algorithm works
The check digit calculation uses modulo 11 with multipliers from 2 to 7:
- 1. Take the digits of the RUT (without the check digit).
- 2. Multiply each digit from right to left by the series
2,3,4,5,6,7,2,3,4...(repeating). - 3. Sum all results.
- 4. Calculate
11 - (sum % 11). - 5. If result is 11 the digit is 0. If it's 10 the digit is K.
Example with 11.111.111-1:
- Digits:
1 1 1 1 1 1 1 1 - Multiply:
1×2 + 1×3 + 1×4 + 1×5 + 1×6 + 1×7 + 1×2 + 1×3 = 2+3+4+5+6+7+2+3 = 32 - Check digit:
11 - (32 % 11) = 11 - 10 = 1→ Digit 1 ✓
Another example with 1234567-K:
- Calculation produces 10 → K ✓
When and why to validate RUT
RUT validation is essential in any Chilean system handling tax data:
- Electronic invoicing: SII requires valid RUTs to issue DTE (Electronic Tax Documents).
- E-commerce: Validate customer data at checkout (especially in B2B sales).
- HR systems: Register employees with correct RUT for pension contributions.
- User onboarding: Banks, fintechs, and digital platforms validate RUT during registration.
Doing client-side validation prevents useless server requests and improves UX. Server-side validation is critical before integrations with SII APIs (invoicing, CAF stamping, etc.) or Civil Registry queries.
SII provides a web service to verify economic activities associated with a RUT, but requires authentication.
Limitations and common mistakes
This validator does not verify:
- If the RUT is registered with SII or Civil Registry.
- If the person or company is active, deceased, or dissolved.
- If the RUT corresponds to an individual or legal entity.
- If associated data (name, address) are correct.
Common implementation mistakes:
- Not supporting uppercase/lowercase K: Always normalize to uppercase before validating.
- Rejecting RUT without dots: Users type
12345678-5or12.345.678-5. You should accept both. - Not validating length: RUT must be 7 to 9 characters (excluding dots and hyphen).
- Confusing RUT with passport: Foreigners without RUT may have passports (which aren't validated with this algorithm).
For official queries of existence and activities, use SII APIs or certified identity verification services.