npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eu-vat-rates-data

v2026.9.18

Published

Official-source European VAT rates for 45 jurisdictions. Daily-checked data, TypeScript types, offline JSON, and VAT number format validation.

Readme

eu-vat-rates-data

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:

| Language | Package | Install | |---|---|---| | JavaScript / TypeScript | npm | npm install eu-vat-rates-data | | Python | PyPI | pip install eu-vat-rates-data | | PHP | Packagist | composer require vatnode/eu-vat-rates-data | | Go | pkg.go.dev | go get github.com/vatnode/eu-vat-rates-data-go | | Ruby | RubyGems | gem 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.