You should spend at least two days in Hanoi to see the main sights and experience the bustling lanes and culture of the city. If you want to visit the sights in depth and look around the many good museums, allow at least 4 days to explore Hanoi.