Rain halted Sunday morning but resumed in the afternoon in Hanoi, where many streets remained submerged under up to three feet of water. More rain was expected in the city in the next few days, according to the national forecast center.
Officials warned that the flooding could worsen.
"All the lakes and rivers are swollen, threatening the dikes around Hanoi," said a city disaster official who identified himself only as Hoang.
Rain submerged homes, power stations, schools and offices, stranding many who couldn't return from work. Floods also contaminated city water supplies.
"I had to stay in my office for two days because I did not want to swim home in dirty water. It is a total nightmare," said Nguyen Ngoc Khiem, 29, a businessman.
With the vast Mekong River delta in the south and many lakes and rivers throughout the country, Vietnam is prone to floods, which kill hundreds each year. However, this week's floods were the worst to hit the capital in more than 20 years.
Fourteen more bodies were recovered in Hanoi on Saturday and Sunday, bringing the city's death toll to 18, the VietNamNet news Web site quoted police as saying.
Floods also inundated homes in other provinces in the Red River delta over the weekend.
Vietnam's national television showed images of rivers across the region rising to alarming levels.
In Ninh Binh, water spilled over dikes, submerging about 10,000 homes. One soldier was killed Saturday while helping to reinforce a dike, said Bui Van Thang, chairman of the provincial government.
Authorities mobilized some 1,000 militiamen and police to evacuate villagers to higher ground and rush food and medicine to flooded areas, Thang said.
"Our top priority now is to keep dikes from breaking," Thang said. "In the worst-case scenario, hundreds of thousands people will be affected."
The floods have destroyed thousands of acres of crops across the region.
Three people were washed away Friday in the northern provinces of Hoa Binh and Phu Tho, disaster officials said. Two were reported missing in Vinh Phuc province.
In central Vietnam, the waters had begun receding, but the death toll from a week of flooding rose to 28 after four more bodies were recovered Sunday in Ha Tinh province, said provincial disaster official Tran Thi Suu.
Overall, 12 people drowned in Ha Tinh.
In the neighboring province of Nghe An, floods also killed 12 people last week, including four children, who were swept away while walking home from school.
Four people were killed in Quang Ngai and Quang Binh provinces.