Most countries in the world, except for the US, UK and Canada, do not require a visa if you land in the countries just for transiting purpose. Viet Nam is one of these countries, and does not require any transit visa, as long as you plan to stay inside the airport.
Note, however, international airports such as Ha Noi and Da Nang are rather small and not the best places for a light sleeper. Therefore if you have an overnight transit, you might want to exit the airport and stay at a nearby hotel. In those cases, you will need a normal single entry visa.