Generator · French data
French SIREN
Endpoint GET /v1/fr/siren
What it covers
Returns a valid French SIREN (company identifier) with a correct Luhn checksum. Use `format` for the 14-digit SIRET or the FR VAT number. Set `invalid=true` for a SIREN with a deliberately wrong check digit.
A SIREN is the nine-digit identifier INSEE assigns to every French business. The first eight digits are the payload; the ninth is a Luhn (mod-10) check digit — the same algorithm that guards credit-card numbers. A SIRET extends a SIREN with a five-digit establishment number plus its own Luhn digit over the full fourteen.
How it’s calculated
The ninth digit is a Luhn (mod-10) check digit over the first eight — the classic credit-card checksum.
Algorithm
- Take the eight payload digits.
- Walking from the RIGHT (the check-digit end), double every second digit: the rightmost payload digit is doubled, the next is kept, and so on, alternating.
- Whenever a doubled digit exceeds 9, subtract 9 from it (so 12 → 3, 16 → 7).
- Sum all eight resulting values.
- The check digit is (10 − (sum mod 10)) mod 10 — the final mod 10 turns a would-be “10” back into 0.
Worked example
73282932? (an eight-digit payload)
7 (kept) = 7
3 × 2 = 6
2 (kept) = 2
8 × 2 = 16, 16 − 9 = 7
2 (kept) = 2
9 × 2 = 18, 18 − 9 = 9
3 (kept) = 3
2 × 2 = 4
sum = 7+6+2+7+2+9+3+4 = 40
40 mod 10 = 0
(10 − 0) mod 10 = 0The check digit is 0, so the full SIREN is 732829320.
References
Edge cases
- The first digit is drawn 1–9 for the common shape, though SIRENs beginning with 0 do exist and are still valid.
- With invalid=true the Luhn check digit is offset by 1–9 mod 10, which can never land back on the correct value — so the number always fails validation while keeping the right length and shape.
Gotchas
- Luhn doubles every second digit counting from the RIGHT (from the check-digit side), not from the left — starting the doubling on the wrong end produces a different, wrong check digit.
- When a doubled digit exceeds 9, you subtract 9 (equivalently, add its two digits) — e.g. 8×2 = 16 → 7. Forgetting this step is the most common Luhn bug.
Parameters
| Parameter | Type | Description |
|---|---|---|
| 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 valid edge-case SIRENs from the rare corners. |
| 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. |
| format | "siren" | "siret" | "vat" | Rendering: bare SIREN (default), 14-digit SIRET, or FR VAT number. |
| invalid | boolean | Return a SIREN with a deliberately wrong Luhn check digit. |
| seed | integer | Integer seed for reproducible output: the same seed always yields the same record. |
Response fields
| Field | Type | Description |
|---|---|---|
| value | string | The identifier in the requested format (SIREN, SIRET, or VAT). |
| digits | string | The canonical 9-digit SIREN. |
Other generators for France
The same kind of identifier elsewhere
Try it