eu-vat-rates-data

August 23, 2026 · View on GitHub

npm version npm downloads Test Last updated License: MIT

VAT rates for 45 European countries — all EU-27 member states plus Norway, Switzerland, the United Kingdom, and more. EU rates sourced from the European Commission TEDB and checked daily. Published automatically when rates change.

Part of VATNode VAT Rates · canonical dataset · methodology · other languages: Python, 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 validateFormat() — free, no API key needed — unique to this package
  • TypeScript types included — works in Node.js and the browser
  • JSON file committed to git — full rate-change history via git log
  • Checked daily via GitHub Actions, new npm version published only when rates change

Available in 5 ecosystems:

LanguagePackageInstall
JavaScript / TypeScriptnpmnpm install eu-vat-rates-data
PythonPyPIpip install eu-vat-rates-data
PHPPackagistcomposer require vatnode/eu-vat-rates-data
Gopkg.go.devgo get github.com/vatnode/eu-vat-rates-data-go
RubyRubyGemsgem install eu_vat_rates_data

Why eu-vat-rates-data?

Unlike hand-maintained constants, the EU-27 data is checked daily against an official source. Unlike a runtime tax API, the package works offline and remains reproducible when its version is pinned. It includes multiple rate types, TypeScript declarations, VAT-number format metadata, and standard-rate history through the canonical dataset.


Need live VIES validation?

This package gives you VAT rates and format checks for free, offline, in your code. It does not call VIES — validateFormat() 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 for compliance and audit trails
  • 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

npm install eu-vat-rates-data
# or
yarn add eu-vat-rates-data
# or
pnpm add eu-vat-rates-data

Usage

TypeScript / ESM

import { getRate, getStandardRate, getAllRates, isEUMember, isKnownCountry, dataVersion } from 'eu-vat-rates-data'

// Full rate object for a country
const fi = getRate('FI')
// {
//   country: 'Finland',
//   currency: 'EUR',
//   eu_member: true,
//   vat_name: 'Arvonlisävero',
//   vat_abbr: 'ALV',
//   standard: 25.5,
//   reduced: [10, 13.5],
//   super_reduced: null,
//   parking: null
// }

// Just the standard rate
getStandardRate('DE') // → 19

// EU membership check — false for non-EU countries (GB, NO, CH, ...)
if (isEUMember(userInput)) {
  const rate = getRate(userInput) // type narrowed to EUMemberCode
}

// Dataset membership check — true for any of the 45 European countries
if (isKnownCountry(userInput)) {
  const rate = getRate(userInput) // type narrowed to CountryCode
}

// All 45 countries at once
const all = getAllRates()
Object.entries(all).forEach(([code, rate]) => {
  console.log(`${code}: ${rate.standard}%`)
})

// When were these rates last fetched?
console.log(dataVersion) // e.g. "2026-03-27"

// VAT number format validation — no API key, no network call
import { validateFormat } from 'eu-vat-rates-data'
validateFormat('ATU12345678')  // → true
validateFormat('DE123456789')  // → true
validateFormat('INVALID')      // → false

// Access format metadata directly
const at = getRate('AT')
console.log(at.format)   // "ATU + 8 digits"
console.log(at.pattern)  // "^ATU\\d{8}$"

// Flag emoji from a 2-letter country code — no lookup table, computed from regional indicator symbols
import { getFlag } from 'eu-vat-rates-data'
getFlag('FI')  // → '🇫🇮'
getFlag('DE')  // → '🇩🇪'
getFlag('XX')  // → '' (empty string for unknown/invalid codes)

CommonJS

const { getRate, isEUMember, isKnownCountry } = require('eu-vat-rates-data')

console.log(getRate('FR').standard) // 20

Direct JSON — always the latest data

# Served directly from GitHub CDN:
https://cdn.jsdelivr.net/gh/vatnode/eu-vat-rates-data@main/data/eu-vat-rates-data.json

# Raw GitHub (always latest commit):
https://raw.githubusercontent.com/vatnode/eu-vat-rates-data/main/data/eu-vat-rates-data.json
const res = await fetch(
  'https://cdn.jsdelivr.net/gh/vatnode/eu-vat-rates-data@main/data/eu-vat-rates-data.json'
)
const { rates } = await res.json()
console.log(rates.DE.standard) // 19

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.

import { getStandardRate } from 'eu-vat-rates-data'

// Money in minor units (cents). Never floats.
function invoiceTotal({ netCents, buyerCountry, reverseChargeEligible = false }) {
  if (reverseChargeEligible) {
    return { vatCents: 0, totalCents: netCents, reverseCharge: true }
  }

  const rate = getStandardRate(buyerCountry)
  const vatCents = Math.round((netCents * rate) / 100)
  return { vatCents, totalCents: netCents + vatCents, reverseCharge: false }
}

// Domestic sale in Finland — 25.5%
invoiceTotal({ netCents: 10000, buyerCountry: 'FI' })
// → { vatCents: 2550, totalCents: 12550, reverseCharge: false }

// Finnish seller, German business buyer — reverse charge
invoiceTotal({ netCents: 10000, buyerCountry: 'DE', reverseChargeEligible: true })
// → { vatCents: 0, totalCents: 10000, reverseCharge: true }

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


Data structure

interface VatRate {
  country:       string        // "Finland"
  currency:      string        // "EUR" (or "DKK", "GBP", …)
  eu_member:     boolean       // true for EU-27, false for non-EU
  vat_name:      string        // "Arvonlisävero" — official name in primary local language
  vat_abbr:      string        // "ALV" — short abbreviation used locally
  standard:      number        // 25.5
  reduced:       number[]      // [10, 13.5] — sorted ascending
  super_reduced: number | null // null when not applicable
  parking:       number | null // null when not applicable
  format:        string        // "FI + 8 digits" — human-readable VAT number format
  pattern:       string        // "^FI\\d{8}$" — regex for format validation, always present
}

reduced may contain rates for special territories (e.g. French DOM departments, Azores/Madeira for Portugal, Canary Islands for Spain). All values come verbatim from EC TEDB.

Country codes

Standard ISO 3166-1 alpha-2, with one EU convention: Greece is GR (TEDB internally uses EL, which this package normalises).

Example JSON entry

{
  "version": "2026-03-31",
  "source": "European Commission TEDB",
  "publisher": { "name": "vatnode.dev", "url": "https://vatnode.dev" },
  "rates": {
    "FI": {
      "country": "Finland",
      "currency": "EUR",
      "eu_member": true,
      "vat_name": "Arvonlisävero",
      "vat_abbr": "ALV",
      "standard": 25.5,
      "reduced": [10, 13.5],
      "super_reduced": null,
      "parking": null,
      "format": "FI + 8 digits",
      "pattern": "^FI\\d{8}$"
    }
  }
}

Data source & update frequency

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

Rates are fetched from the European Commission Taxes in Europe Database (TEDB) via its official SOAP web service:

  • Checked against the source: daily at 07:00 UTC, updated on any change
  • Published: new npm version only when actual rates change (not on date-only updates)
  • History: git log -- data/eu-vat-rates-data.json gives a full audit trail of VAT changes across the EU

Data is fetched by the eu-vat-rates-data repository and synced here daily.


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 member states:

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

Additional European countries:

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

45 countries total.


Changelog

See CHANGELOG.md.


License

MIT

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