Generator · Slovenian data
Slovenian EMŠO
Endpoint GET /v1/si/emso
What it covers
Returns a valid Slovenian EMŠO (Enotna matična številka občana) with a correct mod-11 check digit. Constrain with `sex` and age/birth-date filters (the full birth date is encoded). Contradictory combinations are rejected with a 400. Set `invalid=true` for a deliberately wrong check digit.
How it’s calculated
The 13th digit of a Slovenian EMŠO is a weighted mod-11 check over the first twelve digits, using the 11-complement, with residue 0 mapping to check 0 and residue 1 rejected as unissued.
Algorithm
- Take the first 12 digits of the EMŠO in order. They are DDMMYYY RR BBB: day (2), month (2), last three digits of the birth year (3), a two-digit region code RR (Slovenia uses 50–59), and a three-digit serial BBB.
- Apply the fixed position weights [7, 6, 5, 4, 3, 2, 7, 6, 5, 4, 3, 2] to those 12 digits, position by position (digit 1 × 7, digit 2 × 6, …, digit 12 × 2).
- Sum all twelve products to get the weighted sum S.
- Compute the residue r = S mod 11.
- If r = 0, the check digit is 0.
- If r = 1, there is no valid single-digit check (the 11-complement would be 10, which cannot be written in one position); this EMŠO is not issued — in generation the region/serial are redrawn.
- Otherwise the check digit is 11 − r (a value from 2 through 9).
- Append the check digit as the 13th digit.
Worked example
Female born 1988-05-23, region 50, serial 500 → EMŠO 230598850500?
First twelve digits: DD=23, MM=05, YYY=988 (1988 mod 1000), RR=50, BBB=500 → 2 3 0 5 9 8 8 5 0 5 0 0
Weights: 7 6 5 4 3 2 7 6 5 4 3 2
Products: 2×7=14, 3×6=18, 0×5=0, 5×4=20, 9×3=27, 8×2=16, 8×7=56, 5×6=30, 0×5=0, 5×4=20, 0×3=0, 0×2=0
Sum S = 14+18+0+20+27+16+56+30+0+20+0+0 = 201
Residue r = 201 mod 11 = 3 (11×18=198, 201−198=3)
r is neither 0 nor 1, so check = 11 − 3 = 8The check digit is 8, giving the full EMŠO 2305988505008.
Edge cases
- Residue 1 has no representable check digit (the complement would be 10); such a candidate is not a valid EMŠO. The generator loops and redraws the region and serial until a valid check digit exists.
- Residue 0 yields check digit 0 (not 11), so it is handled as a special case separate from the 11 − r complement.
- The year field YYY is only the last three digits of the birth year (year mod 1000), so 1988 and 2988 would share the same date head; the generator only encodes 1900–2099.
Gotchas
- The serial band BBB encodes sex: 000–499 is male, 500–999 is female. It is part of the checksummed payload, so changing the sex band changes the check digit.
- The weight pattern is the palindrome-free repeat 7 6 5 4 3 2 applied twice across the 12 payload digits, not a single run of descending weights.
- Only the first 12 digits enter the weighted sum; the 13th (check) digit itself is never weighted.
Parameters
| Parameter | Type | Description |
|---|---|---|
| atAge | integer | Exact age in years at request time. |
| bornAfter | stringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$ | Born after this date or fragment (YYYY, YYYY-MM, YYYY-MM-DD). |
| bornBefore | stringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$ | Born before this date or fragment (YYYY, YYYY-MM, YYYY-MM-DD). |
| bornOn | stringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$ | Born on a date or within a fragment: YYYY, YYYY-MM, or YYYY-MM-DD. |
| count | integer1–1000 | Number of records to return, 1–1000 (your plan may lower this). Omitted returns a single record; set it for a batch. |
| edge | boolean | Restrict output to edge-case values. |
| extreme | boolean | Return a correct value wrapped in a hostile encoding (untrimmed whitespace, invisible/zero-width characters, BOM, or bidi/combining marks). Homoglyphs are excluded so the value stays machine-parseable; it still validates after normalisation. |
| invalid | boolean | Return an EMŠO with a deliberately wrong check digit; date/sex stay valid. |
| olderThan | integer | Minimum age in years at request time. |
| seed | integer | Integer seed for reproducible output: the same seed always yields the same record. |
| sex | "m" | "f" | Encoded sex: "m" or "f". |
| youngerThan | integer | Maximum age in years at request time. |
Response fields
| Field | Type | Description |
|---|---|---|
| value | string | The EMŠO rendered as the bare 13 digits. |
| digits | string | The canonical 13-digit EMŠO. |
| birthDate | string | The encoded birth date, ISO `YYYY-MM-DD`. |
| sex | "m" | "f" | Encoded sex: `m` (serial 000–499) or `f` (serial 500–999). |
Other generators for Slovenia
Slovenian companySlovenian company nameSlovenian davčna številkaSlovenian email addressSlovenian IBANSlovenian personSlovenian person nameSlovenian product or service offeringSlovenian vehicle registration plate
See all generators for Slovenia →The same kind of identifier elsewhere
Austrian data · Austrian SVNRBelgian data · Belgian RijksregisternummerBulgarian data · Bulgarian EGNCroatian data · Croatian JMBGCroatian data · Croatian OIBCypriot data · Cyprus TICCzech data · Czech rodné čísloDanish data · Danish CPRDutch data · Dutch BSNEstonian data · Estonian isikukoodFinnish data · Finnish henkilötunnusFinnish data · Finnish Y-tunnusFrench data · French NIRGerman data · German Steuer-IdNrGreek data · Greek AFMGreek data · Greek AMKAHungarian data · Hungarian adóazonosító jelHungarian data · Hungarian személyi azonosítóHungarian data · Hungarian TAJIrish data · Irish PPSNItalian data · Italian Codice FiscaleLatvian data · Latvian personas kodsLithuanian data · Lithuanian asmens kodasLuxembourg data · Luxembourg matriculePolish data · Polish PESELPortuguese data · Portuguese NIFRomanian data · Romanian CNPSlovak data · Slovak rodné čísloSpanish data · Spanish DNISpanish data · Spanish NIESwedish data · Swedish personnummer
Try it