nif validator apinie validator spainspanish tax id validationdni validator apinif checker

NIF / NIE Validator API

Validate Spanish NIF and NIE tax identification numbers instantly.

REST API to validate Spanish NIF (Número de Identificación Fiscal) and NIE (Número de Identidad de Extranjero) numbers. Checks format, control letter, and document type. Returns whether the document is valid, the detected type, and the canonical formatted version. No external API key required.

POST/api/trpc/nifValidator.validate
1 token / callAPI online

How it works

Three steps. No complex setup.

1

Send your request

Make a POST with the data you want to analyze. Include your API key in the Authorization header.

2

We process server-side

Our engine validates, analyzes and enriches the data in under 200ms. No external APIs, no network latency.

3

Receive the result

Typed JSON with all documented fields. Clear errors if something fails. Production ready.

Who is it for?

Spanish e-commerce platforms validating customer tax IDs at checkout
HR software verifying employee identity documents
Fintech apps performing KYC for Spanish users
SaaS platforms onboarding Spanish businesses

Response example

Real input and output. What you send and what you get back.

// Input

{
  "nif": "12345678Z"
}

// Output

{
  "nif": "12345678Z",
  "valid": true,
  "type": "NIF",
  "formatted": "12345678Z",
  "error": null
}

Try it now

// live demo — no account needed to try

Playground

Demo activa1 token

Integrate into your project

Copy and paste. Replace YOUR_API_KEY with your real key.

curl -X POST https://jsnhengine.com/api/trpc/nifValidator.validate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"json": {"nif":"12345678Z"}}'

Why choose JSNH Engine Lab

Low latency

Responses in under 200ms

Secure authentication

API keys with per-plan rate limiting

Usage tracking

Every request logged with metrics

Production ready

Input validation and typed errors

Frequently asked questions

Everything you need to know before integrating.

Other modules

Expand your integration with more APIs from the catalogue.

Community reviews

What developers using this module say

Sign in to leave a review

No reviews yet. Be the first!

// production ready

Start using NIF / NIE Validator API

Sign up free and get 1,000 tokens to start. No credit card. No complex setup.