Hanoi is a generally safe city, and a little common sense should keep you out of harm's way. Traffic accidents are not uncommon in Vietnam's cities and towns—take care crossing the street. Pickpockets and thieves are an issue—keep an eye on personal belongings especially in public and avoid ostentatious displays of wealth. Bar areas can be less safe late at night compared to other parts of Hanoi.
Vietnamese usually will not initiate conflicts with foreign visitors, but if challenged they may resort to violence as a means for solving an argument. As an Asian tonal language, Vietnamese can sound grating to Western ears—keep in mind that someone might sound like they're angry when they're not. On the whole, the Vietnamese are usually friendly to outsiders, especially Americans.
Still, many Vietnamese see no problem whatsoever in charging foreigners more for goods or services. There is no foolproof way to avoid being overcharged from time to time. Make sure that prices are as clear as possible before making a purchase, and ride only in taxis with meters. When booking a tour, clarify what's included in the price.