EIN Formatter
EverydayFormat raw Employer Identification Numbers into XX-XXXXXXX instantly. Accepts bulk input, strips non-digits, with optional masking — all in your browser.
What is a EIN?
The EIN Formatter takes raw Employer Identification Number input — nine digits in any combination of digits, hyphens, spaces, or other separators — and outputs each number in the IRS-standard XX-XXXXXXX format. An EIN is the federal tax identifier issued by the US Internal Revenue Service to businesses, trusts, non-profit organisations, and estates operating in the United States.
The standard display format places a single hyphen after the second digit: the raw number 987654321 becomes 98-7654321. This contrasts with a Social Security Number (XXX-XX-XXXX), which uses two hyphens — a common source of formatting confusion when both types of identifiers appear in the same system. Use the SSN Formatter for individual SSN formatting.
EINs appear on a wide range of US tax and legal documents: Form W-2 (employer wage statements), Form 1099 (contractor payments), Form 941 (payroll tax deposits), business licence applications, IRS correspondence, and bank account opening documents. Consistent XX-XXXXXXX formatting is required on all federal tax filings.
For Indian companies operating US subsidiaries or employing US workers, EIN management is a routine part of US tax compliance. Indian developers building payroll, HR, or fintech software for the US market frequently need to normalise EIN input from multiple sources into a single canonical format before processing or display.
All formatting is client-side — your EIN data never leaves your browser and is never transmitted to any server.
How to use this EIN calculator
- Paste your EIN input into the "Raw EIN Input" textarea — one EIN per line. The formatter accepts raw digits, hyphen-formatted, or space-separated input.
- Toggle "Mask last 4 digits" if you need partially redacted output (XX-XXX####) for display in reports or shared documents.
- Review the output in the "Formatted EIN(s)" panel — formatted entries show XX-XXXXXXX, while invalid entries display an error message with the actual digit count found.
- Click the copy button to copy all formatted EINs to your clipboard.
- Fix any flagged error lines in your source data and re-paste for a clean batch output.
- Use the formatted output directly in tax documents, database inserts, or payroll system imports — the XX-XXXXXXX format matches what IRS forms and US financial systems expect.
Formula & Methodology
Formatting algorithm: 1. Split input by newlines. 2. Strip all non-digit characters from each line using/\D/g. 3. Check digit count — if not exactly 9, output an error for that line. 4. Split the 9-digit string:digits[0..1](2-digit prefix) anddigits[2..8](7-digit suffix). 5. If masking is enabled, replacedigits[5..8]with####. 6. Join with a hyphen:prefix + '-' + suffix. Before/after example: | Raw Input | Formatted Output | Masked Output | |---|---|---| |123456789|12-3456789|12-345####| |98-7654321|98-7654321|98-765####| |12 3456789|12-3456789|12-345####| |12.3456789|12-3456789|12-345####| |1234567| Error: expected 9 digits, got 7 | — | EIN vs SSN format summary: | Identifier | Format | Hyphen positions | |---|---|---| | EIN | XX-XXXXXXX | After digit 2 | | SSN | XXX-XX-XXXX | After digit 3 and digit 5 | Both are 9 digits total. The EIN has one hyphen; the SSN has two. The SSN Formatter handles SSN formatting separately. For background on the underlying term, see our glossary entry on EIN.
Frequently Asked Questions