Barcelona is generally considered a safe place for tourists. The city has implemented several measures to ensure the safety of its residents and visitors. The local police force is highly visible and actively patrols popular tourist areas, making sure that order is maintained. Additionally, Barcelona benefits from a well-developed public transportation system that operates efficiently throughout the day and night, allowing tourists to navigate the city safely.
It's worth noting that like in any major urban area, pickpocketing can occur in crowded tourist spots; however, staying vigilant and taking basic precautions such as keeping belongings secure can greatly reduce the risk.