Ecuador cédula check digit
Enter 171003406 and get check digit 5, so the full cédula is 1710034065; or paste ten digits to see whether the last one fits the official modulo-10 rule. Handy for sign-up forms, payroll and e-invoicing. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Cedula
- 171003406
- Calculation mode
- Compute
- Input
- 171003406
- Body
- 171003406
- Check digit
- 5
Every Ecuadorian cédula de identidad for a natural person is a ten-digit number whose last digit is not free form: it is a public check digit produced by the Registro Civil modulo-ten coefficient method. Developers building KYC forms, payroll imports, e-invoicing gateways, and school or clinic registration tools constantly need either to compute that digit from the first nine positions or to confirm that a typed full cédula is consistent under the official weights. This Ecuador cédula check digit calculator accepts nine digits to return the check digit and completed number, or a full ten-digit cédula to recompute the expected digit and set a clear valid flag. Spaces and hyphens are stripped so clipboard paste from PDFs still works.
How the Ecuadorian cédula check digit is computed
An Ecuadorian national identity cédula for a natural person is ten decimal digits. The first two digits encode the province of issuance and must be a value from zero one through twenty-four corresponding to the official provincial catalogue. The third digit is restricted to zero through five for natural persons; higher third digits belong to other taxpayer schemes with different algorithms and are outside this natural-person check.
Digits four through nine form a sequential body assigned by the civil registry. The tenth digit is completely determined by the first nine: it is not chosen by the citizen and cannot be guessed independently of those nine values. The standard modulo-ten coefficient method multiplies each of the nine body digits by a fixed alternating weight vector two, one, two, one, two, one, two, one, two from left to right.
Whenever a product is greater than or equal to ten, nine is subtracted from that product so each position contributes a single digit-like value. All nine adjusted products are added to form a weighted sum. The check digit is ten minus the sum modulo ten, and if that difference would be ten the check digit becomes zero—equivalently, check equals open parenthesis ten minus open parenthesis sum modulo ten close parenthesis close parenthesis modulo ten.
Because every step is integer arithmetic on a fixed weight table, two clients that send the same nine digits always receive the same check digit, the same weighted sum, and the same product breakdown. The method is not Luhn as used on payment cards in every detail of presentation, even though both families use a mod-ten idea: here the coefficients are fixed left-to-right for the cédula layout, and province plus third-digit rules further constrain valid bodies.
Do not reuse a generic Luhn validator on Ecuadorian cédula fields if you need province and third-digit enforcement plus the documented product list in the response.
Where checking a cédula digit pays off
Onboarding and KYC forms for Ecuadorian customers often ask users to type a cédula and need an instant client-side check before a slower back-office review against official systems. Educational sites that rank for phrases such as ecuador cedula check digit calculator or digito verificador cedula ecuador need a live free tool whose browser path matches automation so tutorial screenshots stay accurate. Clinics, schools, and municipalities recovering a worn plastic card may only have nine reliable digits and need the tenth to complete online appointments, insurance filings, or enrollment forms.
Never treat a passing check digit as proof that the person is correctly identified, alive, resident, or present in the Registro Civil: it only proves the digit string is consistent under the published modulo-ten coefficient method for natural-person cédulas.
What you can do with it
Form and KYC pre-checks
Validate a typed ten-digit Ecuadorian cédula before submit so users fix a wrong check digit without a server round-trip to civil-registry systems.
Recover the check digit from nine digits
Compute the official last digit from a nine-digit body when a card is worn, partially legible, or stored without the check digit.
Batch payroll and CRM imports
Score rows of Ecuadorian identifiers in scripts: recompute the check digit, set valid, and quarantine mismatches before they hit HR or billing systems.
FAQ
How is the Ecuadorian cédula check digit calculated?
Multiply the first nine digits by the coefficients 2,1,2,1,2,1,2,1,2. If a product is 10 or more, subtract 9. Sum the adjusted products, then take (10 − sum mod 10) mod 10 as the check digit. For example, body 171003406 yields check digit 5.
What province and third-digit rules apply?
Natural-person cédulas use province codes 01 through 24 and a third digit from 0 through 5. Other third digits belong to different taxpayer schemes and are rejected by this calculator.
Can I validate a full ten-digit cédula?
Yes. Send ten digits (spaces or hyphens allowed).
Can I paste a cédula with spaces or hyphens?
Yes. Spaces and hyphens are removed first, so a number copied from a PDF still works. With nine digits left the tool computes the check digit; with ten it checks the one you typed.
Does this also check a company RUC?
No. It covers cédulas of natural persons, whose third digit is from 0 to 5. Higher third digits belong to other taxpayer schemes with different rules and are outside this check.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/enc/ci-ecuador \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"cedula":"171003406"}'const res = await fetch("https://api.kit.forhosting.com/enc/ci-ecuador", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"cedula": "171003406"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/ci-ecuador",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"cedula": "171003406"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/ci-ecuador", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"cedula":"171003406"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"cedula":"171003406"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/ci-ecuador", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"cedula": "171003406"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.ci_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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Province codes must fall in zero one through twenty-four and the third digit must be zero through five for natural persons, so malformed bodies fail with invalid_input instead of inventing a digit.
Input contract, response shape, and validation modes
Optional mode may be auto, compute, or validate; auto is the default and infers compute when exactly nine digits remain after stripping spaces, hyphens, dots, and underscores, or validate when exactly ten digits remain. POST a JSON body with one required string field named cedula. Aliases text, input, number, digits, value, ci, and n are accepted so thin clients and generic text boxes can reuse the same endpoint without renaming fields. Compute mode returns check_digit as a one-character string, full as the completed ten-digit cédula, body as the nine-digit payload, province and third_digit for display, weighted_sum and products for transparency, coefficients as the fixed weight vector, algorithm set to modulo10_coefficients, mode compute, and valid true because no conflicting digit was supplied. Validate mode expects a full ten-digit string including the trailing check digit; the engine recomputes the expected digit, compares it to the provided last digit, sets valid to true or false, and echoes provided_check_digit so user interfaces can highlight a mistyped character without guessing. Empty strings, non-digit characters after separator removal, wrong lengths for the selected mode, province codes outside zero one through twenty-four, and third digits outside zero through five raise invalid_input with a message that names the problem; those failures are not billed. Successful API calls cost the published base price of $0.002 per item; the in-browser tool remains free for interactive checks. Prefer compute when you assemble a cédula from a known nine-digit body recovered from partial documents; prefer validate when a user, partner file, or OCR pipeline supplies a full ten-digit number and you need a boolean gate before a civil-registry or master-data lookup.
Where an Ecuador cédula check digit API earns its keep
Payroll and HR imports receive employee identifiers from spreadsheets where a single wrong last digit would reject a whole batch; a deterministic oracle that returns expected check_digit and valid lets importers flag rows without calling government portals for every line. Developers building multi-country tax-id and national-id suites can call this specialised endpoint when the country is Ecuador and they want the digit itself plus province context, not only a boolean, while keeping separate validators for Spanish DNI letters, Argentine CUIT weights, or Brazilian CPF.
Technical questions
What happens if the check digit is wrong?
In validate mode the response still includes the expected check_digit and full string, and valid is false if the last digit does not match. Completely malformed input fails with invalid_input.
What does the Ecuador cédula check digit calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.