needn't have done vs didn't need to do (C1 Grammar)
Needn't have + the past participle means you did something, and only afterward it turned out to be unnecessary. The action happened. The regret is that the effort was wasted. This form is mainly British: American English usually says didn't have to for both situations, so the neat contrast on the next card is one you will meet most often in British writing and speech.
needn't have done: you did it, but it turned out pointless
You needn't have brought an umbrella. (You brought one, but it stayed dry.)
She needn't have rushed. (She rushed, but the train was late anyway.)
We needn't have booked early. (We booked early, but there were plenty of seats.)
Not "You didn't need to bring an umbrella. (to say you brought one and wasted the effort)" — say "You needn't have brought an umbrella. (to say you brought one and wasted the effort)". Only needn't have carries "you did it, and it was wasted"; didn't need to just says there was no need.
Try it: Hiroshi printed forty copies of the report for the meeting. When he arrived, everyone already had the file on their laptops, so the printed copies went untouched. Which one fits when he DID the thing and it turned out pointless? (He needn't have printed the report. / He didn't need to print the report.) Answer: He needn't have printed the report. — He printed the copies and the effort was wasted, and needn't have printed is the form that carries exactly that: he did it, and it was for nothing. "Didn't need to print" only says there was no need; it leaves the wasted effort unsaid, so it misses the point of the scene.
didn't need to: there was no need (it may or may not have happened)
Didn't need to + the base verb means simply that there was no need. On its own it does not tell you whether the thing happened. The wording around it shows that: "I didn't need to pay, so I walked straight in" (skipped it) and "I didn't need to pay, but I paid anyway out of habit" (did it) are both fine.
You didn't need to bring an umbrella. (There was no need; whether you brought one is a separate matter.)
She didn't need to explain, but she did anyway, just to be safe. (no need, yet she did it)
We didn't need to queue, so we walked straight in. (no need, and we skipped it)
Not "You needn't have brought an umbrella. (when you did NOT bring one)" — say "You didn't need to bring an umbrella. (whether or not you brought one)". Use needn't have only when the thing definitely happened; didn't need to leaves that open.
Try it: Amina assumed she would have to pay for parking, but the lot was free that day. She kept her money in her pocket and walked in. She never actually paid. Which one fits? (She didn't need to pay for parking. / She needn't have paid for parking.) Answer: She didn't need to pay for parking. — She kept her money and walked in, so she never paid: didn't need to pay simply states there was no need. "Needn't have paid" carries that she actually paid and wasted it, which cannot be right here since she never paid at all.
Try it: Mateo cooked a second dish in case more guests came. No extra guests arrived, and the dish sat there. Sofia thought she would have to renew her pass, but it was still valid, so she put her card away. Match each one to the form that fits the scene. Answer: Mateo cooked a second dish in case more guests came. No extra guests arrived, and the dish sat there. → 1 → He needn't have cooked a second dish. · 2 → She didn't need to renew her pass. Sofia thought she would have to renew her pass, but it was still valid, so she put her card away. → 1 → He didn't need to cook a second dish. · 2 → She needn't have renewed her pass. — Mateo did cook the dish and it went to waste, so needn't have cooked fits, because that form carries "did it, and it was wasted". Sofia found her pass still valid and put her card away without renewing, so needn't have renewed cannot fit (it would mean she renewed); didn't need to renew is right, since it only says there was no need.