Skip to content

Instantly share code, notes, and snippets.

@maciejniedzielski
Created May 24, 2019 10:25
Show Gist options
  • Save maciejniedzielski/db4f92ec3aa2b4274e24dd8884ad73fb to your computer and use it in GitHub Desktop.
Save maciejniedzielski/db4f92ec3aa2b4274e24dd8884ad73fb to your computer and use it in GitHub Desktop.
European countries VAT Numbers
{
"AT": {
"country": "Austria",
"regex": "^(AT)?U[0-9]{8}$"
},
"BE": {
"country": "Belgium",
"regex": "^(BE)?0[0-9]{9}$"
},
"BG": {
"country": "Bulgaria",
"regex": "^(BG)?[0-9]{9,10}$"
},
"CY": {
"country": "Cyprus",
"regex": "^(CY)?[0-9]{8}L$"
},
"CZ": {
"country": "Czech Republic",
"regex": "^(CZ)?[0-9]{8,10}$"
},
"DE": {
"country": "Germany",
"regex": "^(DE)?[0-9]{9}$"
},
"DK": {
"country": "Denmark",
"regex": "^(DK)?[0-9]{8}$"
},
"EE": {
"country": "Estonia",
"regex": "^(EE)?[0-9]{9}$"
},
"EL": {
"country": "Greece",
"regex": "^(EL)?[0-9]{9}$"
},
"GR": {
"country": "Greece",
"regex": "^(GR)?[0-9]{9}$"
},
"ES": {
"country": "Spain",
"regex": "^(ES)?[0-9A-Z][0-9]{7}[0-9A-Z]$"
},
"FI": {
"country": "Finland",
"regex": "^(FI)?[0-9]{8}$"
},
"FR": {
"country": "France",
"regex": "^(FR)?[0-9A-Z]{2}[0-9]{9}$"
},
"GB": {
"country": "United Kingdom",
"regex": "^(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$"
},
"HU": {
"country": "Hungary",
"regex": "^(HU)?[0-9]{8}$"
},
"IE": {
"country": "Ireland",
"regex": "^(IE)?[0-9]S[0-9]{5}L$"
},
"IT": {
"country": "Italy",
"regex": "^(IT)?[0-9]{11}$"
},
"LT": {
"country": "Lithuania",
"regex": "^(LT)?([0-9]{9}|[0-9]{12})$"
},
"LU": {
"country": "Luxembourg",
"regex": "^(LU)?[0-9]{8}$"
},
"LV": {
"country": "Latvia",
"regex": "^(LV)?[0-9]{11}$"
},
"MT": {
"country": "Malta",
"regex": "^(MT)?[0-9]{8}$"
},
"NL": {
"country": "Netherlands",
"regex": "^(NL)?[0-9]{9}B[0-9]{2}$"
},
"PL": {
"country": "Poland",
"regex": "^(PL)?[0-9]{10}$"
},
"PT": {
"country": "Portugal",
"regex": "^(PT)?[0-9]{9}$"
},
"RO": {
"country": "Romania",
"regex": "^(RO)?[0-9]{2,10}$"
},
"SE": {
"country": "Sweden",
"regex": "^(SE)?[0-9]{12}$"
},
"SI": {
"country": "Slovenia",
"regex": "^(SI)?[0-9]{8}$"
},
"SK": {
"country": "Slovakia",
"regex": "^(SK)?[0-9]{10}$"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment