Fake VAT Number Generator

EU VAT number format strings for tax tool testing

Generate VAT number strings that follow the correct national format for EU member states, including the country prefix, exact length, and a valid check digit where the country uses one. For testing EU tax and compliance tools — not real registrations. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Are these real, registered VAT numbers?

No. They follow the structural format and, where applicable, the check-digit algorithm of each country, but they are random and not registered to any business. Checking them against the EU VIES service will return not valid.

A VAT number is the identifier a business uses for value-added tax across the European Union. Each member state has its own format — different lengths, prefixes, and in some cases a check digit that must satisfy a published algorithm. When testing tax, invoicing, or checkout tools you need values that look right structurally. This tool generates fictional, correctly-formatted VAT numbers per country, with a valid check digit where the country defines one. They are for testing only and are not registered to any business.

How it works

Every EU VAT number begins with a two-letter ISO country code, followed by the national number. The generator:

  1. Reads the country you select and looks up its exact format — length and any structural quirks.
  2. Fills the national portion with random digits.
  3. For countries with a deterministic public check digit (for example Germany’s modulus-11 routine and the Netherlands’ modulus-11 over nine digits), it computes and appends the correct final digit so the number passes a local format validation.

The country prefix is then prepended to produce the complete VAT identifier.

Country formats at a glance

EU VAT formats vary significantly in length and structure. A few examples to illustrate:

CountryPrefixFormatExample
GermanyDE9 digits, check digitDE123456789
FranceFR2 alpha-numerics + 9 digitsFR12345678901
NetherlandsNL9 digits + B + 2 digitsNL123456789B01
SpainES9 chars (letter/digit/letter)ES12345678A
SwedenSE12 digitsSE123456789001
ItalyIT11 digitsIT12345678901

The Netherlands format is especially unusual — the B character in the middle is a literal separator, not a digit or letter code. Italy and Germany have 11 and 9 digits respectively with different check-digit algorithms. France uses a two-character alpha-numeric block that can include letters, which is why a simple [A-Z]{2}\d{9} regex fails on French VAT numbers.

Format validation versus VIES lookup

The EU provides the VIES (VAT Information Exchange System) service for live lookup of registered VAT numbers. Testing against VIES from a development environment can cause rate limiting issues, and live lookups are not suitable for unit tests that need deterministic results.

The generated numbers here pass format validation — the structural check that a front-end or parsing library performs — while intentionally failing a VIES registry lookup. This two-layer distinction is important to understand when building a checkout or invoicing tool:

  1. Format check — does this string match the expected pattern for its country prefix? Generated numbers pass this.
  2. Registry check — is this VAT number registered to an active business in VIES? Generated numbers fail this, which is exactly what you want for test data.

Build your tests to exercise both layers separately. Use generated numbers to test the format layer; use a dedicated stub or mock for the VIES call.

Practical tips

  • Use a country with a known check-digit rule (such as DE or NL) when you want to verify your own check-digit validator produces the same result.
  • Generate a batch across multiple countries to stress-test a parser that must handle the full EU format variety.
  • These numbers are designed to pass format validation but to fail a registry lookup — ideal safe test data that will not accidentally match a real business.
  • Everything runs locally with no API call, so you can generate freely without internet access.