Generator · Austrian data

Austrian UID

Endpoint GET /v1/at/uid

What it covers

Returns a valid Austrian UID (Umsatzsteuer-Identifikationsnummer) with a correct check digit. Use `format=vat` for the intra-EU `AT`-prefixed form. Set `invalid=true` for a UID with a deliberately wrong check digit.

How it’s calculated

The Austrian UID's 8th digit is a Luhn-variant check digit over the seven payload digits: even-position (1-indexed) digits get the Luhn doubling transform, the rest pass through, and the total is closed with a +4 offset before taking the 10's-complement mod 10.

Algorithm

  1. Take the seven payload digits c1 c2 c3 c4 c5 c6 c7 (the digit string after the literal 'U', before the check digit). The first digit is 1-9 in the canonical generator; leading zero is reserved for the edge case.
  2. Define the Luhn-variant transform s(x) = floor(x / 5) + ((2 * x) mod 10). This is exactly the value you'd get by doubling x and adding the two resulting decimal digits (e.g. 8 -> 16 -> 1+6 = 7; and floor(8/5)+(16 mod 10) = 1+6 = 7).
  3. Walk the payload left to right using 0-based index. At odd index (i.e. positions 2, 4, 6 counting from 1 — the 2nd, 4th, 6th payload digits) replace the digit with s(digit). At even index (positions 1, 3, 5, 7) keep the digit as-is.
  4. Sum all seven transformed/passed-through values into 'sum'.
  5. Add the fixed offset 4: total = sum + 4.
  6. Compute the check digit as (10 - (total mod 10)) mod 10. The outer 'mod 10' maps a raw complement of 10 back to 0, so the result is always a single decimal digit.
  7. Append the check digit as the 8th digit. Optionally prefix 'U' (national form) or 'ATU' (intra-EU VAT form).

Worked example

Austrian UID with payload 1234567 and unknown check digit: U1234567?

Payload digits (0-based index): [0]=1, [1]=2, [2]=3, [3]=4, [4]=5, [5]=6, [6]=7.
index 0 (odd? no) passthrough -> 1
index 1 (odd) s(2) = floor(2/5) + (4 mod 10) = 0 + 4 = 4
index 2 (even) passthrough -> 3
index 3 (odd) s(4) = floor(4/5) + (8 mod 10) = 0 + 8 = 8
index 4 (even) passthrough -> 5
index 5 (odd) s(6) = floor(6/5) + (12 mod 10) = 1 + 2 = 3
index 6 (even) passthrough -> 7
sum = 1 + 4 + 3 + 8 + 5 + 3 + 7 = 31
total = sum + 4 = 35
check = (10 - (35 mod 10)) mod 10 = (10 - 5) mod 10 = 5

The check digit is 5, giving the full UID body 12345675 (national form U12345675, intra-EU form ATU12345675).

Edge cases

  • The check transform always yields exactly one decimal digit (the outer mod 10 collapses a complement of 10 to 0), so no payload prefix ever needs to be redrawn.
  • The canonical generator draws the first payload digit as 1-9, so the standard body is never leading-zero; a leading-zero payload is emitted only by the separate edge generator.

Gotchas

  • This is NOT plain Luhn. Two things differ from standard Luhn: (a) the transformed positions are the even-from-the-left payload digits (indices 1,3,5 zero-based) rather than an every-other pattern anchored at the check digit, and (b) a fixed +4 offset is added to the sum before taking the 10's-complement.
  • The Luhn-variant transform s(x) = floor(x/5) + ((2x) mod 10) is the arithmetic-closed form of 'double the digit and add its digits together' — don't mistake it for a simple doubling.
  • The 'U' (and 'AT' for the VAT form) are literal, non-numeric prefixes and are excluded from the checksum computation; only the seven numeric payload digits feed the algorithm.

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 UIDs 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"national" | "vat"Rendering: `national` U-prefixed form (default) or `vat` intra-EU form.
invalidbooleanReturn a UID with a deliberately wrong check digit.
seedintegerInteger seed for reproducible output: the same seed always yields the same record.

Response fields

FieldTypeDescription
valuestringThe UID in the requested format (national or VAT).
digitsstringThe canonical 8 digits (7 payload + 1 check).

Other generators for Austria

See all generators for Austria →

The same kind of identifier elsewhere

Try it

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