Sanitize.
Guides

What to redact on a W-2 and 1040 before you share them

Every identifier on a W-2 and 1040, box by box, plus the form fields, barcodes and metadata that redaction often misses.

Updated · How we write these guides

The short answer

Remove anything that identifies a person, an account or an employer. Keep every dollar amount, box number, line number and checkbox. An AI tool, an advisor or a friend checking your math needs the numbers. None of them need your Social Security number.

Replace each value with a label instead of deleting it. If the same SSN becomes [SSN_1] everywhere and your spouse's becomes [SSN_2], the reader can still tell whose W-2 is whose.

W-2, box by box

BoxWhat it holdsRedact?
aEmployee's SSNYes
bEmployer identification number (EIN)Yes
cEmployer's name, address and ZIPYes. Your employer narrows down who you are quickly.
dControl numberYes
e, fYour name and addressYes
1 to 11Wages, withholding, Social Security and Medicare amounts, tipsNo. This is what the reader needs.
12, 13, 14Coded amounts (401(k), HSA and so on), checkboxes, other itemsNo, unless box 14 names something personal
15State, and the employer's state ID numberRedact the ID number. Keep the state if you want state tax help.
16 to 20State and local wages and tax, locality nameKeep the amounts. The locality name can point to your town, so judge for yourself.

Form 1040, top to bottom

Header

Redact names, both SSNs, the home address, apartment number, city, state and ZIP, and any foreign address. Keep the filing status, the digital assets answer and the checkboxes.

Dependents

Redact each dependent's name and SSN. Keep the relationship and the credit checkboxes, since those drive the child tax credit and the credit for other dependents. If age matters for the question you're asking, write the age in place of the date of birth.

Income through payments

Keep every line. These are the numbers you want checked.

Refund

Redact the routing number and the account number for direct deposit, lines 35b and 35d on the 2025 form. Keep the refund amount, but read the warning below.

Third party designee, signatures and preparer

Redact the designee's name, phone number and PIN. Redact your occupation and your spouse's, the Identity Protection PIN, your phone number and email. In the paid preparer section, redact the preparer's name, PTIN, firm name, firm EIN, address and phone number.

The other forms in the packet

  • 1099-INT, 1099-DIV, 1099-B, 1099-R. Payer name, payer TIN, your TIN and the account number.
  • 1098 mortgage interest. Lender, your TIN, loan number and the property address.
  • Schedule C. Business name, business address and EIN. Keep the income and expense lines.
  • Schedule E. Each rental property's address.
  • K-1. The partnership's or S corporation's EIN, name and address, and your identifying number.
  • Form 8879. The self-select PINs and the preparer's EFIN and PIN. This form is mostly identifiers, so it's often easier to leave it out.
  • State returns. The same identifiers, plus school district codes in states such as Ohio and Iowa.

Places people miss

Form fields behind the page

PDFs from tax software are often fillable forms. The SSN you see can live in a form field, separate from the page drawing. Some tools redact the page and leave the field, and anything that reads the file, an AI tool included, still finds it.

Boxed digit cells

Forms print SSNs and EINs into one box per digit. When you copy the text out, 123-45-6789 can come back as 1 2 3 4 5 6 7 8 9 or split over several lines, so a search for the formatted number finds nothing.

The 2D barcode

Printed returns, state returns especially, can carry a large 2D barcode that encodes the return data so the tax agency can scan it. Illinois's specification, for example, puts the primary, spouse and dependent SSNs in it. Cover the whole barcode. Covering part of it isn't enough, because barcodes carry error correction that can rebuild missing pieces.

Metadata and file names

The PDF's title, author and keywords can hold your name. So can the file name. Smith_2025_1040.pdf undoes a lot of careful redaction.

Two numbers to think twice about

Two dollar amounts work as proof of identity. The IRS uses your prior-year adjusted gross income to verify you when you e-file. Its Where's My Refund tool asks for your SSN, filing status and the exact refund amount. Without your SSN these numbers are much less useful to anyone, which is one more reason to remove it carefully. If you don't need them for your question, you can redact them too.

How to check your work

  1. Open the redacted PDF and search it for your SSN, your last name and your street name.
  2. Try to select text under each black box. If you can select or copy it, the text is still there.
  3. Copy all the text out of the file and paste it into a plain text editor. That's close to what an AI tool reads.
  4. Look at the barcode area and the signature block one more time.

Our guide on redacting an SSN from a PDF covers tools and the black-box problem in more detail.

Questions

Is it legal to redact my tax return?

Yes, for a copy you share. It's your document. Never alter the return you file, and expect some recipients, such as mortgage lenders, to ask for a complete copy or to get a transcript from the IRS directly.

Should I redact my dependents' SSNs?

Yes. Children's SSNs are prized by identity thieves because nobody checks a child's credit for years. Keep the relationship and the credit checkboxes.

Should I redact the income on my W-2?

Not if you want help with your taxes. The amounts are what an AI tool or advisor needs. Redact the identifiers around them.

Do I need to redact my employer's name from my W-2?

If you want to stay anonymous, yes. Your employer plus your state and salary narrows the field to a handful of people. If you're sharing with an advisor who already knows where you work, it matters less.

Is the last four of my SSN safe to leave?

Not really. The last four digits are the part banks and phone companies use to verify you. For numbers issued before mid-2011, the first five can often be guessed from the state and year of issue. Remove all nine.

Should I redact my state?

Only if you don't need state tax help. On its own it narrows things down only a little, but it sharpens every other clue left in the document.

What about my date of birth?

Redact it. If age matters, for example for catch-up retirement contributions or the extra standard deduction at 65, write your age instead.

Can I just upload a photo of my W-2 with my thumb over the SSN?

That covers box a, but not your name, address or employer. Photos also have their own problems: location data in the file, and text an OCR tool can still read at an angle. Crop or redact properly instead.

Sources

Redact it on your own computer

Sanitize finds SSNs, account numbers, addresses and the names you add, then gives you a redacted PDF and a text file to paste into an AI tool. It runs in your browser, and after setup it works in airplane mode. Redacted downloads up to 3 pages are free, with no account.

Open Sanitize

More guides