Skip to content

Tax ID ValidatorValidate identification numbers without pain.

Lightweight, typed, and easy-to-use library for validating tax IDs across multiple countries.

npm versionnpm downloadsGitHub starsLicenseBundle size

⚡ Quick Start

Get up and running in seconds

1Install
bash
npm install validator-tax-id
2Import & Use
typescript
import {
  validateDNI,
  validateSIREN,
  validateNIF,
  validateSteuerIdNr,
} from "validator-tax-id";

// 🇪🇸 Spain
validateDNI("12345678Z"); // ✅ true

// 🇫🇷 France
validateSIREN("443061841"); // ✅ true

// 🇵🇹 Portugal
validateNIF("123456789"); // ✅ true

// 🇩🇪 Germany
validateSteuerIdNr("86095742719"); // ✅ true

🌍 Supported Countries

Select a country to view specific validation rules and documents.

Missing a country? Request it on GitHub →

🤔 Why Tax ID Validator?

See how we compare to other solutions

Featurevalidator-tax-idRegex OnlyHeavy Libraries
Real checksum validation
Zero dependencies
TypeScript support⚠️
Tree-shakeable-
Bundle size<4KB~0KB50KB+
Individual validators

🚀 Ready to validate?

Start using Tax ID Validator in your project today. Zero config, instant results.