Vietnam runs about a thousand miles from north to south, and that length is the whole answer to this question. At any given moment the country is running three different climates, so a month that is perfect in one region can be the worst of the year in another. The useful question is not when to visit Vietnam but which Vietnam you are visiting.
The short answer, if you want one
March and April are the best single compromise across the whole country. The north has warmed up and dried out, the centre is in its reliable dry run, and the south is still in its dry season. Prices sit in shoulder territory and the crowds are manageable. If you are flying from the United States and can only choose one window for a two-week trip that touches all three regions, this is it.
October and November are the other strong window, and in the north they are arguably better than spring: clear air, comfortable temperatures, and the Sapa rice terraces at their most photogenic. The catch is the centre, and it is a real one — see below before you commit.
Why most articles get this wrong
Search for this question and you will get a single month as an answer. That only works if your trip stays in one region. Once your itinerary includes both Hanoi and Hoi An, some months serve both well and others force a trade — and spotting which is which is the actual decision.
One country, three weather windows: Hanoi · Da Nang · Ho Chi Minh City. (Enable JavaScript for the interactive map.)
The north: four real seasons
Hanoi, Ha Long Bay, Ninh Binh and Sapa get a genuine winter. From December to February expect temperatures in the 50s and 60s Fahrenheit with a persistent grey drizzle the Vietnamese call mua phun — not heavy rain, but damp, overcast and colder than almost any American expects of Southeast Asia. Sapa can approach freezing and occasionally sees snow.
Summer runs hot and wet: June through August brings the 90s with high humidity and the year's heaviest rainfall. The shoulders are the sweet spots. October and November are reliably clear and mild, and March and April warm steadily without the summer downpours.
The air-quality caveat nobody mentions
The State Department notes that air pollution is a significant problem in Vietnam’s major cities, especially Hanoi, and the worst stretch overlaps the cool dry months that are otherwise the north's best — roughly November through March, when still air traps pollution over the Red River delta. That is not a reason to avoid Hanoi in winter, but if you are asthmatic or travelling with someone who is, it belongs in the decision. Check a live air-quality reading rather than a figure printed in any article, including this one.
The centre: a short, violent wet season
Hue, Da Nang and Hoi An are driest from February to August, and that is when their beaches work. The complication is September to November, which is typhoon season on this coast. Hoi An's old town floods in most years, boat trips get cancelled at short notice, and Hue is the wettest major city in the country during this window.
This is the single biggest planning conflict in Vietnam. October and November are excellent in Hanoi and unreliable in Hoi An. Storms are forecastable a few days out but not months ahead, so an autumn trip spanning both regions is a bet rather than a plan you can optimise: keep slack in the central leg, book refundable where you can, and be prepared to lose more than a beach day if a typhoon lands.