Last updated: April 2026
W-2 Box 12 Codes Explained, From A to HH
Most W-2 Box 12 codes are retirement, HSA, or employer health insurance dollars. Four codes cause almost every phone call to HR: DD, W, D, and C. If one of your Box 12 figures looks off by more than a few hundred dollars, it probably is.
Box 12 is the busiest box on the form. There are 26 active letter codes, each tied to a specific IRS rule, and payroll software drops them in automatically based on how items were mapped at setup. When the mapping is wrong in January, it is wrong on every employee W-2 in the company.
How Box 12 actually works on the form
Box 12 on your W-2 has four slots labeled 12a, 12b, 12c, and 12d. Those letters are not codes. They are just placeholders so the printer knows where to put the next entry. The real code is the capital letter you see inside each slot, followed by a dollar amount.
A worker with a 401(k), an HSA, and employer health coverage will usually see three entries: D, W, and DD. Someone at a nonprofit might see E instead of D. A Roth saver sees AA or BB. If you run out of the four printed slots, the employer issues a second W-2 with more Box 12 lines. Cramming two codes into one box is not allowed.
The tradeoff of this compact design is that nothing on the form tells you whether the amount is taxable. You have to know the code. Code D lowers your federal wages in Box 1 but not your Social Security wages in Box 3.
Code DD lowers nothing. Code V raises Box 1. Same box, completely different tax treatment.
The code is the whole story.
The dollar amount is only half of it.
The full list of W-2 Box 12 codes, grouped by what they do
Rather than march A through HH in alphabetical order, it is easier to read the list by function. The IRS groups them loosely the same way in the General Instructions for Forms W-2 and W-3.
Uncollected tax codes (A, B, M, N)
Code A is uncollected Social Security tax on tips. Code B is uncollected Medicare tax on tips. These appear when a tipped worker did not have enough regular wages to cover FICA on reported tips.
Code M is uncollected Social Security tax on group-term life insurance over $50,000 for a former employee, and Code N is the Medicare half of the same thing. If you see A or B, you owe the difference on your 1040. If you see M or N, you are no longer on the payroll and the employer could not withhold it at termination.
Retirement plan deferral codes (D, E, F, G, H, S, Y)
Code D is the big one: traditional 401(k) elective deferrals. Code E covers 403(b) plans used by schools, churches, and nonprofits. Code F is a SEP elective deferral under 408(k)(6).
Code G is 457(b), the government and tax-exempt deferred comp plan. Code H is the rarely used 501(c)(18)(D) plan. Code S is a SIMPLE IRA contribution, which is why small employers using SIMPLE plans will never see a D on their W-2s. Code Y is the deferral amount under a 409A nonqualified plan, not the income side.
Roth contribution codes (AA, BB, EE)
Roth dollars get their own codes because the tax treatment flips. Code AA is a Roth 401(k) contribution. Code BB is Roth 403(b).
Code EE is Roth 457(b). None of these reduce Box 1 wages, because Roth money is taxed now. If you see both D and AA on the same W-2, you split your deferral between pre-tax and Roth, which is legal and increasingly common.
Health and HSA codes (DD, W, FF, R)
Code DD is the cost of employer-sponsored health coverage, both the employer and employee share combined. Code W is the employer plus employee HSA contribution run through payroll. Code FF is a QSEHRA benefit, which applies to small employers with fewer than 50 full-time workers who reimburse individual insurance.
Code R is an employer contribution to an Archer MSA, a plan type that is almost extinct. Code DD is informational only and does not change your tax. Code W is pretax and already excluded from Box 1.
Life insurance, parachute, and stock codes (C, K, V)
Code C is the taxable cost of group-term life insurance over $50,000, calculated on the IRS Table I rates. Code K is the 20 percent excise tax on excess golden parachute payments, which is a very narrow section 280G issue most workers will never see. Code V is income from the exercise of a nonstatutory stock option. Code V is already baked into Box 1 wages. The amount is shown separately so the IRS can match it against broker reporting.
Special situation codes (J, L, P, Q, T, Z, GG, HH)
Code J is nontaxable third-party sick pay. Code L is a substantiated employee business expense reimbursement under an accountable plan. Code P is excludable moving expense reimbursements, which only applies to active duty armed forces members after the 2017 tax law change.
Code Q is nontaxable combat pay for military. Code T is employer-paid adoption benefits. Code Z is income taxed under 409A because a nonqualified plan failed the rules, and it carries a 20 percent penalty on top of regular tax. Codes GG and HH relate to qualified equity grants under section 83(i), an election used by a small number of private company employees.
That is every active code. The letters I, O, U, and X do not exist in Box 12 and never have.
The four codes that generate almost every W-2 complaint
Four codes account for most of the "my W-2 looks wrong" tickets. DD is first. W is second.
D is third. C is fourth. Everything else is noise by comparison.
Code DD is the biggest source of confusion because the dollar amount is usually five figures and employees assume it affects their taxes. It does not. A 45 year old at a midsize employer will typically see a DD amount between $7,000 and $14,000 for single coverage, and $18,000 to $28,000 for family coverage.
Construction and manufacturing plans skew higher. Tech and professional services skew lower. If your DD amount is under $3,000 or over $35,000 for a full year of coverage, ask payroll for the detail.
Code W gets miscoded when an employer forgets to separate employee pretax contributions from employer match contributions. Both go on Code W together. The ceiling for the 2025 tax year was $4,300 for self-only and $8,550 for family, plus a $1,000 catch up at age 55. A Code W amount above those limits is an excess contribution. It needs to come out before the April deadline, or you owe a 6 percent excise tax every year it sits in the account.
Code D errors usually come from employers who process a 401(k) true-up in March and forget to amend the prior year W-2. If your December pay stub showed a higher 401(k) total than your Box 12 Code D, the W-2 is probably wrong, not the pay stub.
Code C catches older workers off guard. Once your employer-paid life insurance crosses $50,000 in coverage, the imputed income jumps every five years. A 60 year old with $150,000 of coverage will see a meaningfully larger Code C than a 45 year old with the same policy.
The Code DD trap that wastes more HR hours than any other
The single biggest W-2 reporting error surfaces every January. Code DD is supposed to report medical and pharmacy coverage. Dental and vision are excluded unless they are bundled into the medical plan and not separately elected. Most payroll systems default to rolling all three together, so Code DD comes out inflated by the cost of standalone dental and vision that should not be there.
The employee sees a number that is a few hundred dollars higher than what a coworker at a similar plan reported and calls HR. HR calls the broker. The broker blames payroll. Payroll blames the benefits file. Meanwhile the W-2 is technically wrong, the employee cannot do anything on their 1040 about it, and nobody wants to file a W-2c because the tax owed does not change.
This is the gotcha. Code DD does not affect your refund, but it still has to be reported accurately. The IRS can assess a $330 penalty per incorrect form under section 6721. For an employer with 400 W-2s, that is $132,000 of exposure over a setup mistake that took 45 seconds to make in December.
Your payroll provider is not your compliance department.
The exception: if an employer has fewer than 250 W-2s for the prior year, Code DD reporting is optional entirely. A 30 person shop that never files Code DD is not out of compliance. A 300 person shop that reports it wrong is.
How to read your own W-2 Box 12 in about two minutes
Pull out the form. Look at Box 1, federal wages, and write down the number. Now look at Box 3, Social Security wages. If Box 3 is larger than Box 1, the difference should roughly match your Code D, E, or S if you have one, because pretax 401(k) money lowers Box 1 but not Box 3. If the difference is larger than your retirement code, you probably also have Code W for HSA or a Section 125 health premium deduction hiding in the gap.
Next, find Box 5, Medicare wages. Box 5 is usually the highest number on the form because almost nothing reduces Medicare wages. If Box 5 is lower than Box 3, something is wrong and you should ask for a corrected W-2.
Finally, look at any Box 12 code you do not recognize. Cross-reference it against the list above. If the dollar amount looks wrong by more than 5 percent, request a written explanation before you file. A W-2 filing mistake costs more to fix after April 15 than before.
When this quick check does not apply: clergy W-2s, statutory employees with Box 13 checked, and workers who changed jobs mid-year and had a 401(k) true-up. Those cases need a CPA, not a two minute scan.
What to do when a Box 12 code is actually wrong
First, do not call the IRS. The IRS will tell you to call your employer, and you already know that. Email your payroll contact with a specific question: "My Code DD shows $14,200 for 2025 coverage. The plan document shows the full cost at $11,400. Can you walk me through the difference?" A specific number forces a specific answer.
If the employer agrees the form is wrong, they file Form W-2c with the Social Security Administration and give you a copy. A W-2c is a correction form, not a replacement, and it shows the old figure and the new figure side by side. You attach the W-2c to your return if you already filed, or you wait and use the corrected numbers if you have not filed yet.
If the employer refuses or stalls past mid-February, call the IRS at 800-829-1040 and report the missing or incorrect form. The IRS will contact the employer and give you permission to file using Form 4852, a substitute W-2, using your pay stubs for the numbers. Most employers fix the problem the same day once an IRS letter arrives.
A wrong Box 12 entry is almost always a payroll software mapping error, not fraud. The fastest path to a fix is the person who runs payroll, not the CFO.
Codes that get confused with each other
Code D and Code AA trip people up because both are 401(k) money. Code D is the pretax side; Code AA is the Roth side. A plan that allows both means you could see both letters on one form.
Code W and Code DD get swapped in cheap payroll software. Code W is the HSA, which is pretax and flows onto Form 8889. Code DD is the medical plan cost, which is informational only. If your W-2 has a DD amount that matches your HSA contribution, the payroll system wrote the wrong letter.
Code V and Code Z confuse stock compensation employees. Code V is ordinary stock option exercise income, already in Box 1. Code Z is a 409A failure and comes with a 20 percent penalty tax. You want to see V. You never want to see Z.
Your next move before you file
Read every Box 12 entry on your W-2 right now, before the form gets filed into a drawer. Match each letter to the list above. If a number looks wrong, email payroll today, not April 10. A correction takes a week if you ask in February and a month if you ask in April.
If you are an employer and you just realized your Code DD mapping pulled in dental and vision, pull a sample of five W-2s and compare the total to your carrier invoice. If the numbers do not match within 2 percent, file W-2c forms now rather than waiting for an SSA letter.
For a payroll platform that handles Box 12 mapping cleanly, Gusto is the easiest setup under 50 employees. ADP is the right call above that. For the full context on year-end reporting, see the W-2 and reporting hub. For how these amounts interact with employer tax filings, the payroll tax hub is the next stop. A vetted payroll provider will not save you from a bad benefits file, but it will catch most of the obvious mapping errors before January.
Frequently asked questions
Does a Code DD amount on my W-2 increase my taxes?
No. Code DD is informational reporting of your employer sponsored health plan cost and does not change Box 1 wages, withholding, or your refund. It exists so the IRS and SSA have coverage cost data at the employer level, not because you owe anything on it.
What does Code W mean on a W-2?
Code W is the total HSA contribution made through payroll, both your pretax portion and your employer's portion combined. You carry the Code W amount to Form 8889 when you file, and the total must stay under the annual HSA limit or you owe a 6 percent excise tax on the excess.
I have both Code D and Code AA. Is that a mistake?
No, that is legal. Code D is pretax 401(k) and Code AA is Roth 401(k). Splitting contributions between the two is a standard planning move, and many plans allow it. Your combined total still has to stay under the annual 402(g) elective deferral limit.
What do I do if my W-2 Box 12 has no code but there is a dollar amount?
That is a software printing error, not a valid W-2. Ask your employer to reissue the form with the correct letter. Every Box 12 amount must have a letter code next to it to be valid for IRS matching.
This is not legal or financial advice. Consult a qualified professional for your specific situation.