HomeFormattersEverydayEIN Formatter

EIN Formatter

Everyday

Format 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

  1. 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.
  2. Toggle "Mask last 4 digits" if you need partially redacted output (XX-XXX####) for display in reports or shared documents.
  3. 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.
  4. Click the copy button to copy all formatted EINs to your clipboard.
  5. Fix any flagged error lines in your source data and re-paste for a clean batch output.
  6. 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) and digits[2..8] (7-digit suffix).
5. If masking is enabled, replace digits[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

An EIN Formatter is a tool that takes raw Employer Identification Number input — nine digits in any layout — and outputs them in the standard XX-XXXXXXX format used by the US Internal Revenue Service (IRS). An EIN is a federal tax identifier issued to US businesses, trusts, estates, and non-profits. Consistent formatting is required on tax filings (Form W-2, 1099, 941), business contracts, and payroll documents.
The IRS standard format for an EIN is XX-XXXXXXX — a two-digit prefix, a hyphen, and seven digits. For example, the raw number 123456789 formats to 12-3456789. Unlike a Social Security Number (XXX-XX-XXXX with two hyphens), an EIN has only one hyphen, after the second digit. This format appears on IRS correspondence, tax forms, and business registrations.
An EIN (Employer Identification Number) identifies a US business entity for tax purposes, using the format XX-XXXXXXX. An SSN (Social Security Number) identifies an individual US resident or citizen, using the format XXX-XX-XXXX. Both are nine-digit numbers but have different formatting conventions, issuance criteria, and legal uses. A sole proprietor may use either their SSN or an EIN for business tax purposes; corporations, partnerships, and LLCs must use an EIN. Use the [SSN Formatter](/ssn-formatter/) for individual SSN formatting.
An EIN is used for US federal tax filings (corporate returns, payroll tax deposits, Form 941), opening a business bank account in the United States, hiring employees and issuing Form W-2 or 1099, applying for business licences, and establishing credit in a business's name. Indian companies with US subsidiaries, LLCs, or branches are required to obtain an EIN from the IRS to meet their US tax obligations.
Yes — paste one EIN per line in the input area and all will be formatted simultaneously. The formatter strips non-digit characters from each line and applies the XX-XXXXXXX pattern. Lines that do not produce exactly 9 digits are flagged individually with an error message, so you can identify and correct problem entries without reprocessing the entire batch.
The 'Mask last 4 digits' option replaces the last four digits of each EIN with hash symbols: 12-3456789 becomes 12-345####. This is useful when sharing EIN lists in reports, emails, or screenshots where full disclosure is not appropriate — for example, in an internal document that does not need all nine digits visible. This provides a basic display redaction only; for secure storage, apply server-side hashing.
No — all formatting happens entirely in your browser using client-side JavaScript. Your EIN input is never sent to any server, stored in a database, or logged in any form. The page works offline once loaded in your browser. This is an important guarantee for handling US federal tax identifiers, which are sensitive business information.
Paste one or more EINs into the input textarea, one per line. Input may be raw digits (123456789), pre-formatted with a hyphen (12-3456789), or separated by spaces (12 3456789) — the formatter accepts all. Toggle 'Mask last 4 digits' if you need partially redacted output. The formatted results appear instantly in the output panel. Click the copy button to copy all formatted EINs to your clipboard.
If a line, after stripping non-digit characters, does not yield exactly 9 digits, the formatter outputs an error message for that specific line: 'Error: "input" — expected 9 digits, got N'. All other lines are still formatted normally. Common causes include partial EINs, entries with extra characters, or placeholder text. Correct the flagged entries and re-paste to get a clean output.
Yes — Indian companies with US subsidiaries, branch offices, or employees in the United States are required to obtain a US EIN from the IRS. This applies to C-corporations, LLCs, and any entity that withholds US taxes, pays US wages, or files US federal tax returns. The EIN is applied for using Form SS-4, which can be submitted online, by fax, or by mail to the IRS.
Yes — FEIN (Federal Employer Identification Number) is simply another name for the same nine-digit tax identifier issued by the IRS. The terms EIN and FEIN are used interchangeably in US business and legal contexts. Some state tax agencies also issue their own state tax IDs, which are separate from the federal EIN. This formatter handles the federal EIN (FEIN) format: XX-XXXXXXX.
Also known as
format EINemployer identification number formatterEIN XX-XXXXXXXformat federal tax IDFEIN formatter