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 offlineEvery check runs locally with no network calls — no VIES round-trips, no rate limits, no data leaving your server.
- VAT for 14 countriesCountry-specific VAT checksum validation for 14 EU member states — structure and check digits, not just a regex.
- IBAN validationISO 13616 IBAN checks with mod-97 verification and per-country length rules.
- BSN & KvKDutch BSN (11-proef) and KvK number validation built in — handy for NL-focused products.
- Zero dependenciesTiny, tree-shakeable, and dependency-free. Ships ESM + types, works in Node and the browser.
- Typed & testedWritten 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.