DevTools Logo
All posts

How to Validate European VAT Numbers in Development

September 1, 2026 · DevTools

vat
europe
testing
qa
fintech

VAT validation has two separate jobs: checking whether a value matches its country's published format, and checking whether the authority currently recognises the registration. The VAT Validator performs the first check locally and can optionally request a live EU VIES result.

Offline format and checksum checks

Normalize spaces, dots and hyphens before matching the country prefix and length. Where a standard publishes a checksum, apply its Luhn, Modulo 11, Modulo 97 or ISO 7064 rule. A checksum-valid value is useful fixture data, but it is not proof that a business exists.

Keep VIES as a separate signal

VIES can return registration status and, when available, a name and address. Treat it as an external service: handle outages and avoid making a test flow depend on one synchronous request.

Use safe test data

Use the VAT Number Generator for synthetic staging and automated-test values. Keep testing-only labels on fixtures and never present generated identifiers as registrations or tax advice.

Tools mentioned in this post