NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Tax ID Validator API

GET

Catch invalid US tax IDs and mask sensitive digits at submission.

Tax ID Validator checks US tax identification numbers including SSNs, EINs, and ITINs for structural validity. It accepts formatted or unformatted strings and returns validation results, normalized formatting, masked numbers, and the last four digits.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/taxidvalidator?taxid=123-45-6789
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "valid": true,
    "taxid": "123-45-6789",
    "type": "SSN",
    "type_full": "Social Security Number",
    "format": "XXX-XX-XXXX",
    "normalized": "123-45-6789",
    "digits_only": "123456789",
    "masked": "***-**-6789",
    "last4": "6789",
    "is_placeholder": true,
    "validation_details": {
      "format_valid": true,
      "area_number_valid": true,
      "group_number_valid": true,
      "serial_number_valid": true
    },
    "risk_score": 35,
    "risk_level": "medium",
    "error": null
  }
}

About the Tax ID Validator API

A tax ID validation API for US SSNs, EINs and ITINs, for checking numbers at signup, payroll and vendor onboarding. Tax ID Validator checks each number against the SSA and IRS numbering rules (SSN area, group and serial numbers, assigned EIN prefixes, ITIN middle-digit ranges) and returns formatted and masked versions, the digits alone and the last four digits, ready to store or display safely.

It catches typos and impossible numbers before they reach a payroll run, a 1099 filing or a KYC review, and the masked output lets support screens show a number without exposing it. It validates format only: it is not EIN or SSN verification against IRS or SSA records, so a well-formed number that was never issued still passes.

The Free plan returns the valid flag, normalized, digits-only, masked and last-four forms, and the EIN prefix or ITIN range check. Paid plans add the detected ID type, the SSN component checks, placeholder detection for filler like 123-45-6789, and a risk score with a low, medium or high band.

How it works

Tax ID Validator strips a leading SSN/EIN/ITIN/TIN label and removes spaces, dots, hyphens and Unicode dashes from taxid, then requires exactly nine digits; anything else returns valid: false, type Unknown, a format error and a fixed risk_score of 50. The type is then inferred from shape alone, unless type (ssn, ein or itin) is sent to force it. A number written with a separator after the second digit (XX-XXXXXXX) is always treated as an EIN. Otherwise a number starting with 9 is treated as an ITIN, except an unformatted one whose middle digits fail the ITIN ranges but whose first two digits are an assigned EIN prefix, which is treated as an EIN. Every other nine-digit number is treated as an SSN, so send unformatted EINs with type=ein.

SSN rules reject area 000, 666 and 900 to 999, group 00 and serial 0000, stopping at the first failure, which is reported in error and the matching validation_details flag. EINs must start with one of the two-digit prefixes the IRS has assigned; unassigned prefixes such as 07, 08, 09, 17 or 89 fail prefix_valid. ITINs must have middle digits in 50 to 65, 70 to 88, 90 to 92 or 94 to 99, checked by itin_range_valid.

normalized is the hyphenated standard form, digits_only the bare digits, last4 the final four, and masked hides all but those four (***-**-6789, or **-****6789 for an EIN). taxid echoes the input as sent. is_placeholder is true for all-identical digits or a strict ascending or descending run such as 123456789. risk_score adds 40 for a failed rule and 35 for a placeholder, so a valid placeholder scores 35; risk_level is high at 60 or above, medium at 25 or above, otherwise low. On the Free plan type, type_full, format, is_placeholder, the risk fields and the SSN component flags are null.

What people use it for

Form Validation
Validate Tax IDs in online forms and applications to ensure correct format before submission
Compliance
Verify Tax ID format compliance for tax reporting, payroll processing, and financial services
Data Quality
Validate Tax IDs in databases during data cleaning and migration to identify invalid entries
Identity Verification
Check Tax ID format as part of identity verification processes while maintaining privacy with masking

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

How it compares

Side by side with the tools people weigh Tax ID Validator against — what each one is better at, in plain terms.

Other ways to use Tax ID Validator

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Tax ID Validator API.

Read the docs →
Which US tax identification numbers can I validate?
The API validates Social Security Numbers (SSN), Employer Identification Numbers (EIN), and Individual Taxpayer Identification Numbers (ITIN). It automatically detects the type from the input structure and runs format, range, and pattern checks for that specific identifier.
Are risk scores and placeholder detection included on the Free plan?
No, these are premium fields available on paid plans starting with Starter. The Free plan returns basic validity, normalized formatting, masked strings, and specific IRS prefix or range checks. Paid plans unlock risk scores, risk levels, filler detection flags, and detailed breakdown checks for SSN area, group, and serial numbers.
How many tax ID checks does the Free plan cover?
The Free plan covers 20 tax ID checks per month. Each validation costs 10 credits. For production workloads, the Starter plan provides 20,000 checks each month, which works out to $1.50 per 1,000 calls (about $0.0015 per check).
What happens if someone submits a filler number like 123-45-6789?
The validator flags simple sequences and all-identical digits using placeholder detection, even if the structure matches an SSN pattern. On paid plans, the placeholder flag returns true and the composite risk score reflects the higher risk level.
Does the validator require hyphens, or can users submit raw digits?
You can submit tax IDs with or without hyphens, spaces or dots, including the en and em dashes that PDFs and word processors produce, and with a leading label such as "EIN:" or "SSN:". Slashes and letters are not stripped, so those are reported as an invalid format. Valid input comes back as normalized (hyphenated), digits_only and masked versions alongside the validation results.
Why is my EIN checked as an SSN?
Nine plain digits look the same for an SSN and an EIN, so the validator reads the layout: XX-XXXXXXX is always checked as an EIN (including 90-95, 98 and 99 prefixes), XXX-XX-XXXX starting with 9 as an ITIN, and any other nine digits as an SSN. Plain nine digits starting with 9 are an ITIN unless the middle digits fall outside the ITIN ranges and the prefix is a valid EIN prefix, in which case they are an EIN. Send EINs with the hyphen after the second digit, or pass type=ein, to get the EIN prefix check.

Ready to build with Tax ID Validator? Start with 200 free credits — one key unlocks all 420+ APIs.

Explore the catalog

420+ APIs on the same key and the same response shape.

Browse all APIs