JMBG check digit
The twelve digits 180198071000 get the check digit 5, giving the full JMBG 1801980710005. Complete or check the unique master citizen number used in Serbia, Bosnia and Herzegovina, Montenegro and North Macedonia before a typo creates a duplicate record. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Number
- 180198071000
- Calculation mode
- Compute
- Input
- 180198071000
- Day
- 18
- Month
- 01
The JMBG (Jedinstveni matični broj građana), often translated as the unique master citizen number, is the thirteen-digit personal identifier introduced across the former Socialist Federal Republic of Yugoslavia and still used—sometimes under related names such as EMBG—in successor states for civil registration, taxation, healthcare, banking, and employment. Compute mode accepts exactly twelve digits—date, region, and serial without the check—and returns the mod-11 digit plus the completed thirteen-digit string. Validate mode accepts thirteen digits (optional spaces or hyphens) and reports whether the trailing digit matches the recomputed expected value.
How the former Yugoslav JMBG check digit is calculated
Under the standard JMBG specification shared by the former Yugoslav republics, the check digit is a weighted modulo-eleven value computed on the first twelve digits of the number. Those twelve digits are the seven-digit date block DDMMYYY (day, month, and the last three digits of the year of birth), the two-digit region code, and the three-digit serial assigned within that day and region.
Each of the twelve positions is multiplied by a fixed weight from the repeating sequence seven, six, five, four, three, two—so the weights are exactly 7, 6, 5, 4, 3, 2, 7, 6, 5, 4, 3, 2 from left to right. The twelve products are summed; the remainder of that sum modulo eleven is taken; the provisional check is eleven minus that remainder. If the provisional value is ten or eleven, the published check digit is zero; otherwise it is the provisional value itself.
The algorithm is deterministic and local: no population registry call, no clock, and no randomness. Compared with generic mod-11 or Swedish personnummer tools, the search intent here is narrow: people who need a JMBG check digit calculator for date-region-serial bases or a thirteen-digit former Yugoslav unique master citizen number checker, not a payment card or Nordic personal number tool.
Where JMBG check digits fit real Balkan and diaspora workflows
Banks and fintechs operating in Serbia, Bosnia and Herzegovina, Montenegro, North Macedonia, and related markets validate thirteen-digit JMBG or EMBG values at account opening so a single transposition does not create a phantom customer and a rejected KYC record. ETL jobs that load customer or employee master files walk every JMBG column in a CSV or XML feed, call validate mode, and quarantine rows where valid is false—catching both human edits and off-by-one bugs in generators.
Municipal and school systems often accept both hyphenated and compact forms; stripping spaces and hyphens before the digit check keeps the contract simple without inventing a second algorithm. Diaspora applications—visa forms, remittance apps, and dual-citizenship portals—frequently receive JMBG values typed by people who left decades ago; a lightweight checksum gate is often the first line of defense before any expensive registry call.
Do not treat a passing JMBG check as proof that the holder is alive in a population register, has a valid national ID card, or is authorized for a service; it only proves the mod-11 digit is consistent with the date, region, and serial under the official former Yugoslav weights.
What you can do with it
Audit JMBG columns in master data
Batch-validate every JMBG or EMBG in a CRM, EHR, or payroll CSV and quarantine rows whose check digit no longer matches the recomputed expected value.
FAQ
What is a JMBG check digit?
It is the thirteenth digit of the former Yugoslav unique master citizen number, computed with a weighted mod-11 algorithm over the seven-digit date, two-digit region, and three-digit serial so typing and scanning errors are usually caught before the number is stored.
Is the JMBG check digit tool free?
The browser tool is free and runs locally.
What do the thirteen digits of a JMBG mean?
The first seven are the birth date as day, month and the last three digits of the year, the next two the region of registration, the next three a serial number, and the last one the check digit. In 1801980710005, 18 is the day, 01 the month and 71 the region.
How is the JMBG check digit calculated?
Multiply the twelve digits by the weights 7, 6, 5, 4, 3, 2 repeated twice, add the products and take the remainder after dividing by 11. Eleven minus that remainder is the check digit, and if it comes out as 10 or 11 the check digit is 0.
Does a valid JMBG prove that the person exists?
No. A correct check digit only shows that the thirteen digits are consistent. No population registry is consulted, so it says nothing about whether the person is living, registered or entitled to any service.
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/jmbg \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"number":"180198071000"}'const res = await fetch("https://api.kit.forhosting.com/enc/jmbg", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"number": "180198071000"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/jmbg",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"number": "180198071000"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/jmbg", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"number":"180198071000"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"number":"180198071000"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/jmbg", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"number": "180198071000"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.jmbg",
"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
The number packs a birth date as day-month-year (seven digits: DDMMYYY with a three-digit year), a two-digit region code for the place of registration, a three-digit serial within that day and region, and a single trailing check digit. That check digit is not arbitrary: it is produced by a fixed weighted sum modulo eleven over the first twelve digits so that a mistyped digit or a swapped pair is usually rejected before the identifier is stored or matched. This capability implements that checksum only. Non-numeric bodies and wrong lengths fail with invalid_input instead of silent stripping. The same pure arithmetic runs free in the browser and at the published API price, with no registry lookup and no claim that a valid checksum means the person is living, registered, or entitled to any service.
How the former Yugoslav JMBG check digit is calculated
Validation recomputes the expected digit from the twelve-digit payload and compares it to the thirteenth digit of the submitted number.
Input contract, modes, and error behaviour
Send a number field that contains the JMBG body. Wrong length is an explicit error that names the mode and the length you sent—twelve for compute, thirteen for validate—so client forms can show a precise message without guessing. Empty strings, missing number, and invalid mode values fail before any weighted sum runs and are not billed. A well-formed string that simply has the wrong check digit returns valid false without throwing. Spaces and hyphens are stripped so common display forms such as 1801980-71-000-5 or spaced groups are accepted after normalization; other punctuation and letters are rejected as non-numeric input with invalid_input so a silently stripped value never reaches storage. Mode compute is the default: the engine requires exactly twelve digits, returns check_digit as a one-character string, returns with_check as the thirteen-digit full JMBG you can print or persist, and also returns day, month, year3, date (DDMMYYY), region, and serial for audit trails. Mode validate accepts exactly thirteen digits; the response reports valid true when the trailing digit matches the recomputed expected_check_digit, and always includes payload (the twelve weighted digits), check_digit, expected_check_digit, the same structural fields, length, and the algorithm label jmbg-mod11 with the weight string. Alias keys such as jmbg, embg, digits, and code are accepted for the same payload field so integrations that already speak regional field names do not need a rename. Because the path is pure parse with no clock, random source, or network, the same JSON body always yields the same JSON result on the free browser tool and on the API at $0.002 per successful request.
Where JMBG check digits fit real Balkan and diaspora workflows
Healthcare portals and pharmacy systems recompute expected_check_digit when a clinic reads a number over the phone or pastes it from a scanned ID card, catching mistypes before a journal entry or prescription is filed. Employers and payroll vendors complete twelve-digit bases in sandboxes with compute mode, then store with_check in test employees that must look like production identifiers.
Integration use cases
Complete a 12-digit JMBG base for test fixtures
Call compute mode with DDMMYYY plus region and serial, store with_check, and use the thirteen-digit JMBG in sandbox KYC, payroll, or healthcare test records.
Validate typed or imported unique master citizen numbers
When a form, bank file, or HR feed submits thirteen digits, call validate mode and block enrollment when valid is false, showing expected_check_digit to help correct a single mistype.
Technical questions
How do I compute a JMBG check digit with this API?
POST with number set to exactly twelve digits (DDMMYYY plus region and serial) and mode compute (or omit mode). The response includes check_digit and with_check (the full thirteen-digit JMBG).
How do I validate a full thirteen-digit JMBG?
POST with the digit string (optional spaces or hyphens) and mode validate. The response includes valid, check_digit, expected_check_digit, and payload (the twelve weighted digits).
What happens with wrong length, letters, or odd punctuation?
After stripping spaces and hyphens, non-numeric input and lengths other than twelve (compute) or thirteen (validate) are rejected with invalid_input. Failed validation tasks are not billed.