Open source · Free npm package

Offline EU identifier
validation

Checksum-accurate VAT, IBAN, BSN and KvK validation that runs entirely on your machine. No network calls, no dependencies.

Three lines to a valid number

Import the check you need and call it. Synchronous, offline, done.
# Install
npm install @alosha/eu-validate

# Use — every validator returns a ValidationResult
import { validateVAT, validateIBAN, validateBSN } from '@alosha/eu-validate'

validateVAT('NL810433941B01').valid      // → true
validateIBAN('NL91ABNA0417164300').valid // → true

const r = validateBSN('111222334')
r.valid   // → false
r.errors  // → ['CHECKSUM_FAILED']  (fails 11-proef)

Everything you need to validate EU data

Built for products that handle European business and personal identifiers.
  • Fully offline
    Every check runs locally with no network calls — no VIES round-trips, no rate limits, no data leaving your server.
  • VAT for 14 countries
    Country-specific VAT checksum validation for 14 EU member states — structure and check digits, not just a regex.
  • IBAN validation
    ISO 13616 IBAN checks with mod-97 verification and per-country length rules.
  • BSN & KvK
    Dutch BSN (11-proef) and KvK number validation built in — handy for NL-focused products.
  • Zero dependencies
    Tiny, tree-shakeable, and dependency-free. Ships ESM + types, works in Node and the browser.
  • Typed & tested
    Written in TypeScript with full types and a green test suite covering every checksum path.

Validate with confidence, offline

Install the package, import the checks you need, and stop trusting raw regexes.