Identifier detector
Croatian OIB: format, validation and detection
Short answer
A Croatian OIB (personal identification number) has 11 digits; the last is an ISO 7064 MOD 11,10 check digit over the first ten. All 11 digits cannot be identical.
What it is
The OIB identifies people and businesses in Croatia. Maskflare's Croatia pack covers it as a national ID, and the GDPR (EU/EEA) profile includes the pack.
In Maskflare this is the detector hr_oib, labelled "Croatia - Personal identification number (OIB)", category national id number, in the Croatia pack.
Format and layout
- 11 digits with no separators: 69435151530.
- The validator reads no date or other field out of the number.
How the check works
Start with a running product of 10. For each of the first ten digits: add the digit to the product, take the remainder modulo 10 (a remainder of 0 becomes 10), double it, and take the remainder modulo 11. The check digit is 11 minus the final product, with 10 read as 0.
The same procedure is used for the German Steuer-ID, which is why Maskflare's two validators share one helper.
Valid and invalid examples
| Example | Result | Why |
|---|---|---|
69435151530 | Valid | Matches the layout and passes the validator. |
69435151531 | Invalid | The invalid example changes one character, the last character: 0 becomes 1. |
In running text the valid example reads, for instance, OIB 69435151530. The invalid one is left alone: a value that fails the validator is treated as an ordinary string.
Regex and validation caveats
- A run of 11 digits is masked unless a word like order or invoice sits closer to it than one of the detector's keywords (id no, id number, identifikacijski broj).
- MOD 11,10 passes about one in ten random numbers, so the context rule on bare runs does real work.
Words that confirm it
The formatted shape is masked without a keyword. For a run with no separators, these words count as the detector's own keywords when a word like order, invoice or phone is also close: id no, id number, identifikacijski broj, identity number, national id, oib, osobni identifikacijski broj, personal id, personal identification, personal number. The nearer word wins.
How to detect it in LLM traffic
Croatian OIB values reach an LLM inside ordinary work rather than as standalone data: a pasted block of HR or payroll rows, a customer-support thread, an onboarding or identity-check form, a spreadsheet someone wants summarised, or an email they want rewritten. The model needs none of the digits for any of those jobs, so the safest place to remove them is before the request leaves the company.
Maskflare reads the whole request body, including the system prompt, earlier messages and tool arguments, so a number buried in the fourth message of a long chat is found as readily as one in the latest message. Each match is replaced with a token such as mf_mask_d7e0 before the request goes out, and with response restoration turned on the real value is put back into the answer for the person who is allowed to see it.
If you build the detection yourself
- Strip spaces, dots and hyphens before running any arithmetic, but remember where they were so the original text can be replaced exactly.
- Match the shape with a pattern anchored on word boundaries, so that a long digit string is not read as several shorter Croatian OIB candidates.
- Run the check from the section above. A failing check is almost always a typo or a made-up value; a passing one removes most look-alikes.
- Treat a run with no separators more carefully than a formatted one: reject it when a word such as order, invoice, phone or reference is nearer to it than one of the identifier's own keywords.
- Replace the value before the text is sent anywhere, and keep a mapping if the answer has to be restored afterwards.
How Maskflare handles it
- Protect now, Finance - Protect now, Healthcare and Developer: mask (a reversible token) when Croatia is a primary country.
- Monitor first: alert (counted, forwarded unchanged) when Croatia is a primary country.
The available actions are mask (reversible token), redact, partial, hash, format-preserving encryption, generalize, alert and block. Masked values are kept encrypted for 30 days so that answers can be restored, then they expire; prompts and responses are not logged. The full list of detectors is in the detector reference.
Compliance profiles that include it
One compliance profile includes the Croatia pack, and applying it turns this detector on: GDPR - EU/EEA. For the GDPR (EU/EEA) profile the Croatia pack is one of the country packs the administrator can choose from; the profile turns on the ones chosen. A profile is a floor: it never turns anything off or weakens a rule that is already stricter.
Frequently asked questions
Is the OIB check digit the same as the German Steuer-ID?
The calculation is the same ISO 7064 MOD 11,10. The German number adds a rule about repeated digits that the OIB does not have.
Does the detector need the word OIB nearby?
No. A run of 11 digits that passes the check is masked unless a word like order, invoice or phone sits closer to it than one of the detector's own keywords.
Is the Croatian OIB detector on by default?
It depends on the organisation's primary countries. It is part of the Croatia pack, which the default Protect now template turns on with the action mask when Croatia is a primary country.
Does a valid Croatian OIB prove the person exists?
No. A check digit shows the value is well formed. Many valid-looking numbers have never been issued, and Maskflare masks them all the same.
Rules on this page describe what Maskflare's detectors and validators check. They are read from the detection catalogue and are not the specification of the body that issues the identifier. Examples are synthetic.