W-2 Box 12 Codes Explained: The 2026 Plain-English Guide.
Every W-2 Box 12 code in one table — what each means, whether it's pre-tax or informational, and how to enter it in tax software. Code DD, Code W, and where Section 125 fits in.
Box 12 of your W-2 is the part of the form most people glance at and ignore. It is also the part that quietly tells the entire story of what your employer paid for your health coverage, what you redirected pre-tax through Section 125, and what landed in your retirement plan. Read it correctly and the rest of the W-2 makes sense.
What Box 12 actually is
Box 12 is a reporting field on Form W-2 with up to four sub-lines (12a, 12b, 12c, 12d). Each sub-line carries a single-letter or double-letter code and a dollar amount. The codes are defined by the IRS. Your employer fills them in based on what flowed through payroll during the calendar year.
Some Box 12 codes are pre-tax, they reduce the wages reported in Box 1 and, for Section 125 contributions, also reduce Boxes 3 and 5 (Social Security and Medicare wages). Other codes are informational, they tell you what something cost without changing your tax bill at all.
Code DD: the most-searched code in America
Code DD reports the total cost of your employer-sponsored health coverage, including both the employer share and your share. It became mandatory for most employers under the Affordable Care Act so employees could see, in one number, what the medical plan actually costs.
Code W: HSA contributions
Code W is the combined total of employer HSA contributions plus the pre-tax HSA contributions you elected through your Section 125 cafeteria plan. Because both flowed through pre-tax payroll, the amount is already excluded from Boxes 1, 3, and 5.
Why Code W matters
Code W is the best line on the W-2 for verifying that your HSA payroll contributions were processed correctly and that those dollars were excluded from federal income, Social Security, and Medicare wages.
Pick a code. See what it means.
Use the interactive lookup below to see how the IRS treats each code:
Every common Box 12 code, in one table
| Code | What it reports | Pre-tax? |
|---|---|---|
| D | 401(k) elective deferral | Yes (federal income tax) |
| DD | Cost of employer-sponsored health coverage | Informational |
| E | 403(b) elective deferral | Yes |
| G | 457(b) elective deferral | Yes |
| S | SIMPLE retirement contribution | Yes |
| W | Employer + employee HSA contributions | Yes |
| AA | Roth 401(k) contribution | No (post-tax) |
| BB | Roth 403(b) contribution | No |
| FF | QSEHRA permitted benefit | Informational |
How Box 12 reveals pre-tax benefits
When a code in Box 12 is pre-tax, the dollars never showed up in Box 1 to begin with. That is the whole point. The IRS uses Box 12 to track the contribution; it uses the lower Box 1 figure to compute your tax. The savings are real, they have already happened, they just look invisible because the wage line is smaller, not because a refund is added on top.
Pre-tax dollars are the dollars that never appeared in Box 1. The savings is the absence, not a line item.
Where Section 125 fits in
Most of the meaningful pre-tax codes (D, E, G, S, W) ride on top of a properly written Section 125 cafeteria plan. The cafeteria plan is the legal mechanism that allows the salary reduction in the first place. Without it, the elections would be considered constructively received income and would be fully taxable.
For employer reporting on the §125 portion specifically, see our companion piece on Section 125 on Form W-2: Box 14.
How to read your full W-2 in 60 seconds
Start at the top. Box 1 is your federal taxable wages, the number that flows to line 1a of your Form 1040. Box 2 is the federal income tax already withheld from your paychecks, which becomes your starting credit on the return. Box 3 is your Social Security wages, capped at the annual SS wage base of $176,100 for 2026. Box 5 is your Medicare wages, with no cap. The gap between your gross salary and Box 1 is almost always explained by a combination of Section 125 elections, 401(k) deferrals, and any other pre-tax payroll items.
Boxes 12 and 14 are the documentation layer. Box 12 carries the IRS-coded items, with up to four sub-lines for codes like D, DD, W, and AA. Box 14 carries employer-defined items in plain text labels. Boxes 16 through 20 cover state and local wages, which usually mirror Box 1 but can diverge in non-conforming states like Pennsylvania and New Jersey. Once you understand how the pre-tax codes lower Box 1 and how the informational codes simply document costs, the rest of the form reads in a single pass.
Entering Box 12 codes in tax software
Most consumer tax software, including TurboTax, H&R Block, and FreeTaxUSA, asks for Box 12 entries one code at a time. Enter each code letter exactly as it appears on the W-2, followed by the dollar amount, and the software handles the downstream impact. Code DD requires no follow-up question because it is informational. Code W triggers questions about HSA distributions and Form 8889. Codes D, E, G, and S trigger retirement-plan questions and may affect IRA contribution eligibility under the spousal-coverage rules.
If a Box 12 code seems wrong, do not adjust it inside the tax software. Contact the employer's payroll department for a corrected W-2 (Form W-2c). Filing a return with a Box 12 figure that does not match what was reported to the IRS triggers an automated mismatch notice from the IRS within six to nine months of filing.
Common Box 12 errors and how to fix them
The most frequent error is Code DD reporting the wrong total cost of employer-sponsored health coverage. The figure should equal the sum of the employer share plus the employee share of medical premiums for the calendar year, not just one or the other. If Code DD looks materially smaller than the sum of twelve months of medical premium deductions plus the employer's contribution, the payroll system likely captured only the employee share. The fix is a corrected W-2 from the employer.
The second frequent error is missing Code W when the employee made HSA contributions through payroll. If the year-end HSA statement shows pre-tax payroll contributions but the W-2 has no Code W entry, payroll missed the contribution code. The dollars almost certainly were excluded from Box 1 in the regular payroll calculations, but the missing Code W creates a reconciliation problem on Form 8889. Request the W-2c.
The third error is Code D figures that exceed the annual 401(k) elective deferral limit, which is $23,500 for 2026 plus a $7,500 catch-up contribution for participants age 50 or older. Excess deferrals must be withdrawn by April 15 of the following year to avoid double taxation, so a Box 12 mismatch here demands prompt attention.
Employer Box 12 reporting checklist
Payroll teams should confirm five items before sending W-2s to the print and mail vendor. First, every applicable Box 12 code must use the IRS-defined letter, not a custom abbreviation. Second, Code DD totals must reflect the full employer-plus-employee cost of medical coverage for the year, calculated using one of the four IRS-approved methods. Third, Code W totals must reconcile to the HSA custodian's year-end statement, including both employer and employee pre-tax contributions. Fourth, retirement-plan codes (D, E, G, S, AA, BB) must reconcile to the plan administrator's year-end census. Fifth, every code with a dollar amount must be supported by a payroll register entry that ties back to a specific paycheck.
The reconciliation takes between two and four hours for a typical payroll office of 100 to 500 employees. The cost of skipping it is measured in W-2c filings, employee help-desk tickets, and IRS mismatch notices that arrive eight months later.
Frequently asked questions
- What does Code DD mean in Box 12 of my W-2?
- Code DD reports the total cost of your employer-sponsored health coverage, the employer share plus your share combined. It is informational only. It is not added to your taxable income. The IRS requires it under the Affordable Care Act so employees can see what their coverage actually costs.
- Is Code DD taxable income?
- No. Code DD is informational. It does not change Box 1 (federal taxable wages) and you do not owe tax on it.
- What is Code W in Box 12?
- Code W is the combined total of employer contributions and your own pre-tax cafeteria-plan contributions to your Health Savings Account. The amount is already excluded from Boxes 1, 3, and 5.
- Why are there two amounts in Box 12?
- Box 12 has four sub-lines (12a, 12b, 12c, 12d). Each can carry a different code. They are letters for layout, not for ranking.
- Does Box 12 affect my refund?
- Pre-tax codes (D, E, F, G, S, W) lower your taxable wages in Box 1, which generally lowers your tax bill. Informational codes (DD, FF) do not.
Continue reading
- Section 125 Cafeteria Plan: The Complete Employer Guide — Section 125 Plan
What a §125 plan is, how POP, FSA, and DCAP work, and how employers implement one in 2026.
- Section 125 on Form W-2: Box 14 and What Employers Report — Section 125 Plan
How §125 elections appear on the W-2, Box 14 and the silent reductions to Boxes 1, 3, and 5.
- HSA Contribution Limits 2026: Self, Family, and Catch-Up — Employee Benefits
The 2026 IRS HSA limits, what they mean for your paycheck, and how to maximise the deduction.
About the author
Muhammad Mudassir — Co-founder & Health Tech Sales Lead
Muhammad Mudassir, who goes by Moe, is a co-founder and health technology operator focused on Section 125 cafeteria plans and zero-cost employer benefits. He has spent years getting employers enrolled in compliant cafeteria plans, onboarding nationwide workforces into the WoW Health and UnifyWell ecosystems, and translating the mechanics of FICA recapture into language that HR, finance, and ownership can act on.