Skip to main content

eu-vat-rates-data · Python

PyPI version Python versions Test Last updated License: MIT

VAT rates for 45 European countries — EU-27 plus Norway, Switzerland, UK, and more. EU rates sourced from the European Commission TEDB and checked daily. Non-EU rates maintained manually.

Part of VATNode VAT Rates · canonical dataset · methodology · other languages: JavaScript, PHP, Go, Ruby

  • Standard, reduced, super-reduced, and parking rates
  • eu_member flag on every country — True for EU-27, False for non-EU
  • vat_name — official name of the VAT tax in the country's primary official language
  • vat_abbr — short abbreviation used locally (e.g. "ALV", "MwSt", "TVA")
  • format — human-readable VAT number format (e.g. "ATU + 8 digits") — unique to this package
  • pattern — regex for VAT number validation + built-in validate_format() — free, no API key needed — unique to this package
  • Full type hints — works with mypy and pyright out of the box
  • Data embedded in the package — works offline, no network calls
  • EU rates checked daily via GitHub Actions, new version published only when rates change

Also available in: JavaScript/TypeScript (npm) · PHP (Packagist) · Go · Ruby (RubyGems)


Need live VIES validation?

This package gives you VAT rates and format checks for free, offline, in your code. It does not call VIES — validate_format() only checks the shape of a VAT number, not whether it actually exists.

For live VIES validation — confirming a VAT ID is real, pulling the registered company name and address, and getting the VIES consultation number as your reference for the check — there's vatnode:

  • Live VIES validation, with national-database fallback when VIES is down
  • Registered company name, address, registration date
  • VIES consultation number — a timestamped record that the check was made against VIES
  • Webhooks for VAT status changes
  • Official MCP server so AI agents (Claude, Cursor, ChatGPT) can validate VAT IDs directly
  • Free tier — no credit card needed
curl https://api.vatnode.dev/v1/vat/IE6388047V \
  -H "Authorization: Bearer YOUR_API_KEY"

See what the API adds → · Get a free API key


Installation

pip install eu-vat-rates-data
# or
uv add eu-vat-rates-data
# or
poetry add eu-vat-rates-data

Usage

from eu_vat_rates_data import get_rate, get_standard_rate, get_all_rates, is_eu_member, has_rate, data_version

# Full rate object for a country
fi = get_rate("FI")
# {
#   "country": "Finland",
#   "currency": "EUR",
#   "eu_member": True,
#   "vat_name": "Arvonlisävero",
#   "vat_abbr": "ALV",
#   "standard": 25.5,
#   "reduced": [10.0, 13.5],
#   "super_reduced": None,
#   "parking": None
# }

# Just the standard rate
get_standard_rate("DE")   # → 19.0

# EU membership check — False for non-EU countries (GB, NO, CH, ...)
if is_eu_member(user_input):
    rate = get_rate(user_input)

# Dataset membership check (all 45 countries)
if has_rate(user_input):
    rate = get_rate(user_input)

# All 45 countries at once
all_rates = get_all_rates()
for code, rate in all_rates.items():
    print(f"{code}: {rate['standard']}%")

# When were EU rates last fetched?
print(data_version)  # e.g. "2026-03-27"

# VAT number format validation — no API key, no network call
from eu_vat_rates_data import validate_format
validate_format("ATU12345678")  # → True
validate_format("DE123456789")  # → True
validate_format("INVALID")      # → False

# Access format metadata directly
at = get_rate("AT")
print(at["format"])   # "ATU + 8 digits"
print(at["pattern"])  # "^ATU\\d{8}$"

# Flag emoji from a 2-letter country code — no lookup table, computed from regional indicator symbols
from eu_vat_rates_data import get_flag
get_flag("FI")  # => "🇫🇮"
get_flag("DE")  # => "🇩🇪"
get_flag("XX")  # => "" (empty string for unknown/invalid codes)

Example: charging VAT on an invoice

Rates alone do not determine invoice treatment. Resolve place-of-supply, customer status, category, exemptions, and any reverse-charge eligibility in your tax logic first; then use the dataset for the applicable numeric rate.

from eu_vat_rates_data import get_standard_rate


def invoice_total(net_cents, buyer_country, reverse_charge_eligible=False):
    """Money in minor units (cents). Never floats."""
    if reverse_charge_eligible:
        return {"vat_cents": 0, "total_cents": net_cents, "reverse_charge": True}

    rate = get_standard_rate(buyer_country)
    vat_cents = round(net_cents * rate / 100)
    return {
        "vat_cents": vat_cents,
        "total_cents": net_cents + vat_cents,
        "reverse_charge": False,
    }


# Domestic sale in Finland — 25.5%
invoice_total(10000, "FI")
# → {'vat_cents': 2550, 'total_cents': 12550, 'reverse_charge': False}

# Finnish seller, German business buyer — reverse charge
invoice_total(10000, "DE", reverse_charge_eligible=True)
# → {'vat_cents': 0, 'total_cents': 10000, 'reverse_charge': True}

reverse_charge_eligible must come from applicable tax logic and evidence. validate_format() only checks a number's shape; it does not establish registration or eligibility.


Type hints

from eu_vat_rates_data import VatRate

rate: VatRate = get_rate("FI")  # type checker knows this is a TypedDict
class VatRate(TypedDict):
    country: str
    currency: str
    eu_member: bool
    vat_name: str
    vat_abbr: str
    standard: float
    reduced: list[float]
    super_reduced: float | None
    parking: float | None
    format: str          # "FI + 8 digits"
    pattern: str         # "^FI\\d{8}$" — always present for all 45 countries
    identifiers: Identifiers  # names of the registrar, register and identifiers

identifiers holds names, never numbers: registry_authority_name, registry_name, registry_code_name, tax_id_name and vat_id_name — the company registrar, the company register, the register number, the business tax number and the VAT identification number. Each is keyed by ISO 639-1 language (every official language, plus en) with the name as the value; for Finland registry_code_name is { fi: "Y-tunnus", sv: "FO-nummer", en: "Business ID" }. null means no official name could be confirmed.


Data structure

reduced may contain rates for special territories (e.g. French DOM departments, Azores/Madeira for Portugal). For EU countries, all values come from EC TEDB.

Standard ISO 3166-1 alpha-2 country codes. Greece is GR (TEDB internally uses EL, which this package normalises).

Example

get_rate("NO")
# {
#   "country": "Norway",
#   "currency": "NOK",
#   "eu_member": False,
#   "vat_name": "Merverdiavgift",
#   "vat_abbr": "MVA",
#   "standard": 25.0,
#   "reduced": [12.0, 15.0],
#   "super_reduced": None,
#   "parking": None
# }

Data source & update frequency

How the daily check works, and what changed when: vatnode.dev/data.

  • EU-27 rates: European Commission TEDB, checked against the source daily at 07:00 UTC, updated on any change
  • Non-EU rates: maintained manually, updated on official rate changes
  • Published to PyPI only when actual rates change (not on date-only updates)

Keeping rates current

Rates are bundled at install time. A new package version is published automatically whenever rates change — but your installed version will not update itself.

Recommended: add Renovate or Dependabot to your repo. They detect new versions and open a PR automatically whenever rates change — no manual update commands needed.

Need real-time accuracy? Fetch the always-current JSON directly:

https://cdn.jsdelivr.net/gh/vatnode/eu-vat-rates-data@main/data/eu-vat-rates-data.json

No package needed — parse it with a single fetch() / http.get() / file_get_contents() call and cache locally.


Covered countries

EU-27 (checked daily against EC TEDB, updated on any change):

AT BE BG CY CZ DE DK EE ES FI FR GR HR HU IE IT LT LU LV MT NL PL PT RO SE SI SK

Non-EU Europe (manually maintained):

AD AL BA CH GB GE IS LI MC MD ME MK NO RS TR UA XK


Changelog

See CHANGELOG.md.


License

MIT

If you find this useful, a ⭐ on GitHub is appreciated.

Metadata

Release files for eu-vat-rates-data 2026.9.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eu-vat-rates-data 2026.9.29
File Size Uploaded
eu_vat_rates_data-2026.9.29.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eu-vat-rates-data 2026.9.29
File Interpreter ABI Platform
eu_vat_rates_data-2026.9.29-py3-none-any.whl Python 3 none any Details

Total release size: 32.2 kB

Release files / eu_vat_rates_data-2026.9.29.tar.gz

Download URL eu_vat_rates_data-2026.9.29.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c19d19a77b01145cac10f9e3b8453661748d04b210b3aeaded0490fc1b0a47cd
BLAKE2b-256 checksum
How to use checksums
2915628db27f20fafb141c48ec3c28f918e537be28db6c672a954a5660fb6703
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / eu_vat_rates_data-2026.9.29-py3-none-any.whl

Download URL eu_vat_rates_data-2026.9.29-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f36b6ba74c8982110c7b98d5d144f35c7e6277bad426faa5204b8eba87f6ae8
BLAKE2b-256 checksum
How to use checksums
745827e99746230876151b262b336cfa6ef437d35a058e023168f0d95680e00b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page