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

  1. Take the eight payload digits.
  2. 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.
  3. Whenever a doubled digit exceeds 9, subtract 9 from it (so 12 → 3, 16 → 7).
  4. Sum all eight resulting values.
  5. 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 = 0

The check digit is 0, so the full SIREN is 732829320.

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

ParameterTypeDescription
countinteger1–1000Number of records to return, 1–1000 (your plan may lower this). Omitted returns a single record; set it for a batch.
edgebooleanRestrict output to valid edge-case SIRENs from the rare corners.
extremebooleanReturn 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.
invalidbooleanReturn a SIREN with a deliberately wrong Luhn check digit.
seedintegerInteger seed for reproducible output: the same seed always yields the same record.

Response fields

FieldTypeDescription
valuestringThe identifier in the requested format (SIREN, SIRET, or VAT).
digitsstringThe canonical 9-digit SIREN.

Other generators for France

See all generators for France →

The same kind of identifier elsewhere

Try it

Generate a live example below — every response is valid by format and entirely synthetic.