Needn't - Don't need to
Needn't+verb and don't need to+ verb are synonymous and interchangeable in most contexts. Bear in mind that needn't is considered more formal/posh and is more common in the UK than the US.
Where there is a difference, however, is when talking about the past. Didn't need to could mean "what you did wasn't necessary", or it could mean "it wasn't necessary and/so you didn't do it". Needn't have+participle removes this ambiguity.
You didn't need to wear a tie (maybe you did) — No tenías que llevar corbata (pero lo hiciste) / No tuviste que llevar corbata
You needn't have worn a tie (You did) — No tenías por qué haber llevado corbata
See more examples here.
In DualTexts Articles