This isn't to put anyone off going to Hanoi or Vietnam in general, it's more of a guide of what you should know/be aware of when visiting this city. These are all related to my experience as well.
I couldn't recommend going to Hanoi more if I wanted to. It was a big highlight of my travels in 2017 and I would go back tomorrow if I could. However, not every city/country is a smooth journey and Hanoi definitely has some bumps and cracks along the way. I suggest you continue reading if you are planning on going to Hanoi anytime soon as these will save you a bit of disappointment. These are also things that I wish I was prepared for when entering this chaotic city.
Plan in advance.
Hanoi is one of those cities where there is so much to do it's impossible to do it without creating a rough plan. There's so much history in this city which is shown through museums, parks, a prison and other historic buildings. Before you get going or as you're arriving to your accommodation, make a quick note of the places you want to go to, would like to go to if you have time, and nearby places to visit you could go to if you have a bit of spare time in a day; this is exactly what my friend and I did to make our visit a lot more enjoyable and worthwhile (I recommend you do this if you are travelling solo). We also planned to take a few day trips in between city days exploring. Use leaflets from around your accommodation, or online if you have internet access - Trip Advisor comes in handy when you're new to a country/city.
A big tip is to calculate up what you want to do in and around the city and how many days you'll need to accomplish it all; don't rush it and get through it all in two days. I was there for a week and managed to get around as much as possible, including day trips to Halong Bay and Ninh Binh.
Traffic is insane, and I mean insane.
I couldn't not mention the traffic as it's something to consider when talking about the safety of the city. You'll get to some areas and it's more like a six way road instead of two way. The biggest of your worries are the mopeds as they drive erratically and dangerously. Just when you think the whole street has quietened down a moped will come speeding past, missing you by a few seconds.
Traffic and road safety has never been a big worry in my books as I'm very aware but Hanoi took my stress to a whole new level. I was continuously looking right left, up down, all over; I'd end up coming back to the hostel with shaking legs because I was so on edge walking back.
My friend and I were planning to go to Cat Ba island instead of Halong Bay as it is a little more reserved and less touristy. The itinerary we were looking at said the drive there was about 4 hours long (bare in mind this was just for a day trip), we went to enquire about it and they said we'll need to spend a few days there to make it worthwhile as it takes about 6/7 hours to get there, not 4 - so we'd have about an hour there and then have to head back home. It turned out that Halong Bay took us 4 hours in a minibus and Cat Ba is a lot further up that Halong Bay. So before going ahead and booking the first trip you see, double check with the staff about the information and how accurate it is, and also having a second opinion will help you get a more accurate understanding of the whole itinerary.
You'll likely get lost in the Old Quarter - take a map.
And that's exactly what I did, many times. My friend was staying at a different hostel at the time (as we booked our trips separately and not knowing we'd be there at the same time) and even just walking from mine to hers was a trek and a half. It was just around the corner as well but the small streets which all look the same really get you puzzled. From a bird's eye view it must be like looking in the Where's Wally books as everything looks the same and it's impossible to find anything. So grab a map, highlight your hostel or the street of your hostel so you don't have to remember the name of the street, and get exploring!
Avoid going around Vietnamese New Year (same dates as Chinese New Year).
This was a rookie mistake I made and the consequence to this was missing out on a few trips to museums. Vietnamese is like any national holiday where many places close for a few days (some up to a week) and sadly it was the days I was there which they had closed. Some of these historic sites included the Vietnamese Women's Museum (highly recommended from anyone who's visited Hanoi before), Vietnam Museum of Ethnology, Temple of Literature & National University - definitely worth checking other places you're interested in seeing if they're open or not around this time. Luckily Hoa Lo Prison was open throughout this time and I couldn't recommend going here more if you are interested in learning about the Vietnamese War in more depth (warning: it can get very graphic and emotional).