ForHosting KIT · Developer Utilities

Ecuador RUC check digit

1710034065001 is valid: a natural person from province 17, check digit 5 in position ten and establishment 001. The tool reads the third digit to pick the right rule, modulo 10 or modulo 11, and tells you which taxpayer type it found. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Ruc
1710034065001
You get
Type
natural_person
Type label
Natural person (persona natural)
Third digit
1
Province code
17

The Ecuadorian RUC (Registro Único de Contribuyentes) is the thirteen-digit tax identifier issued by the Servicio de Rentas Internas for natural persons, private companies, and public entities. The first two digits encode the province, the third digit selects the taxpayer class, a weighted check digit sits at position nine or ten depending on that class, and the trailing block is the establishment or branch code. This capability validates a pure thirteen-digit RUC by routing on the third digit: values zero through five use the natural-person modulo-ten rule shared with the cédula, six uses the public-entity modulo-eleven weights, and nine uses the private-company modulo-eleven weights. The response reports whether the stored check digit matches the recomputed value, which type was detected, the province code, the establishment block, and the expected check digit when one exists.

How Ecuador RUC types and check digits work

A well-formed RUC is always thirteen decimal digits when punctuation is stripped. Positions one and two are the province code and must be in the range zero-one through twenty-four for domestic jurisdictions, or thirty for foreign residents registered in Ecuador. Position three is the type discriminator that chooses both the legal category and the arithmetic: digits zero through five mark a natural person (persona natural), including special regimes that still follow the cédula-style body; digit six marks a public entity (sector público); digit nine marks a private company (sociedad privada).

Digits seven and eight are reserved and are not valid type codes, so this tool rejects them before any weighted sum runs. For natural persons the first ten digits match the national identity number (cédula) and the check digit is position ten under modulo ten with coefficients two-one repeated: each product of nine or more is reduced by nine (digit sum), the sum is taken modulo ten, and the check is ten minus that remainder, or zero when the remainder is already zero.

For private companies the check digit is also position ten, but the weights are four, three, two, seven, six, five, four, three, two over the first nine digits and the remainder of the sum modulo eleven maps to zero when the remainder is zero, otherwise eleven minus the remainder; a mapped value of ten means no single decimal check digit exists and the number cannot be valid.

For public entities the check digit is position nine, the weights are three, two, seven, six, five, four, three, two over the first eight digits, and the same modulo-eleven mapping applies. After the check digit, natural and private RUCs carry a three-digit establishment code that must be between one and nine hundred ninety-nine (matrix is usually zero-zero-one); public entities carry a four-digit branch block that must be between one and nine thousand nine hundred ninety-nine.

Audit RUC columns in e-invoicing exports

Batch-validate every RUC in a sales or withholding CSV and quarantine rows whose check digit no longer matches the recomputed value or whose third digit is a reserved code.

What is an Ecuadorian RUC check digit?

It is the verifier digit inside a thirteen-digit RUC, computed from the leading body with weights that depend on the third digit: modulo ten for natural persons (positions 0–5) and modulo eleven for public entities (6) and private companies (9).

What does the third digit mean?

0–5 means natural person (modulo-10 check at position 10), 6 means public entity (modulo-11 check at position 9), and 9 means private company (modulo-11 check at position 10).

What happens with letters, hyphens, wrong length, or bad province codes?

Failed validation tasks are not billed. Strip formatting in your client before calling.

Is the Ecuador RUC check digit tool free?

The browser tool is free and runs locally.

Is a natural person's RUC the same as their cédula?

Almost. For a natural person, the first ten digits of the RUC match the cédula, check digit included, and the last three digits are the establishment code, such as 001. That is why both use the same modulo 10 rule.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/enc/ruc-ecuador

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/enc/ruc-ecuador \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ruc":"1710034065001"}'
{
  "ruc": "1710034065001"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.ruc_ecuador",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Non-numeric characters, wrong lengths, invalid province codes, and reserved third digits are rejected with a clear invalid_input error. Run it free in the browser or call the KIT API; both paths share the same pure arithmetic with no network round-trip and no SRI registry lookup.

How Ecuador RUC types and check digits work

Because every step is fixed-weight modular arithmetic, the same thirteen digits always produce the same validity verdict on browser, Worker, or offline harness—which is why the capability ships as a tier-A parse engine rather than a model call or a live SRI query.

How to validate a RUC with this API

Send a ruc field that contains only characters zero through nine and is exactly thirteen digits long. Empty strings, missing ruc, lengths other than thirteen, province codes outside zero-one through twenty-four and thirty, and third digits seven or eight fail before any weighted sum runs and are not billed. Prefer this capability when you need Ecuador-specific type reporting and the official dual modulo-ten / modulo-eleven routing; a generic multi-country tax-id format checker will not apply the SRI third-digit branches or establishment rules. Spaces, dots, hyphens, letters, and decimal points are rejected as non-numeric input with invalid_input so a form never accepts a silently cleaned value—strip any formatting mask in your client before the call. On success the engine returns ruc as the normalized digit string, valid as a boolean, type as one of natural_person, public_entity, or private_company, type_label as a short English description, third_digit, province_code, algorithm as modulo_10 or modulo_11, check_position (nine or ten), check_digit as submitted, expected_check_digit when a decimal digit could be computed, establishment as the trailing branch block, length thirteen, and algorithm_id ruc_ecuador. Valid is true only when the check digit matches and the establishment block is in the allowed non-zero range for that type; a wrong check digit still returns a structured payload with valid false so you can show “expected X, got Y” without a second request. Because the path is pure parse with no clock, random source, or network, the same input always yields the same JSON on the free browser tool and on the API. At $0.002 per successful request you can protect bulk CRM imports, e-invoicing gates, and partner file audits without negotiating a custom tier.

Where RUC validation fits real product workflows

Ecuadorian fintech and marketplace onboarding flows ask for a RUC early; validating check digits and type on blur reduces failed submissions and support tickets without calling SRI for every keystroke. Accounting and e-invoicing systems that issue comprobantes electrónicos should quarantine rows whose check digit no longer matches or whose establishment block is all zeros before the document reaches authorization. Do not treat a passing check digit as proof that the taxpayer exists in SRI systems, that the RUC is active, or that the establishment is currently authorized to issue invoices—it only proves the thirteen-digit string is arithmetically well formed under the official type-dependent rules, the same honesty bar you apply to any tax-id checksum tool. Payroll and HR imports of independent contractors can gate storage on valid true and surface type_label so operators see whether the number is a natural person, private company, or public entity. Data-quality jobs recompute expected_check_digit for every RUC column in an ERP export and flag mismatches before they reach fiscal reporting or withholding files.

Gate signup and KYC forms on a valid RUC

When a customer types a thirteen-digit RUC, validate on blur, show type_label and expected_check_digit if valid is false, and block proceed until the check digit and establishment block pass.

Classify taxpayer type before routing workflows

Use the returned type field (natural_person, private_company, public_entity) to choose document templates, withholding rates, or approval paths without a separate registry call.

How do I validate a RUC with this API?

POST with ruc set to exactly thirteen digits (0-9 only). The response includes valid, type, type_label, check_digit, expected_check_digit when available, province_code, establishment, and algorithm.

Read the full KIT documentation →