The fact of the matter is that foreigners are easy targets. As a seasoned solo female traveler, my travel safety motto is this: if you can't look like a local, try to look like an expat.
This comes down to clothing, accessories, and attitude.
How to dress like an expat
Believe it or not, in almost every country, the locals wear jeans and sneakers. Many travel websites advise against jeans. They recommend hiking gear that protects against weather and heat and especially those that can double up as shorts. No one wears those in a city in real life. If you're planning on urban exploration, pack a pair of jeans and some sneakers and you'll blend right in. If you're going to a hot location, pack a sundress that's not too revealing and some sandals and you'll be fine.
Pack sensible shoes
Nowadays, there are many styles of trail running shoes on the market that are nice enough to pass as casual city shoes. Pack these instead of bulky hiking shoes; they'll serve you for outdoor pursuits just as well.
I've hiked the Inca Trail in trail runners quite comfortably. I've also climbed snow-topped peaks in Kyrgyzstan wearing skinny jeans and trail runners. It's wasn't ideal, but it was possible.
Ditch the day pack
All travel backpacks come with a 10-15 liter day pack. Backpacks are for kids. Wear a handbag like a normal person. The ideal handbag for travel safety slings across your torso so that you can browse hands-free.
Make sure that it has a zipper and that the zipper faces towards the front where you can keep an eye on it. When you're walking down the street, rest your arm on the surface of the zipper to make it more difficult for pickpockets to snatch your stuff. Besides being safer than a backpack, carrying a handbag will make you look like you're just going about your daily business.
This way, you will come across as a less vulnerable target.
Walk like you own the place
If you want to blend while traveling solo, you have to walk like you belong in the city. You have to look like you know where you're going. This means no obvious map-reading.
Try not to take your guidebook out on the street. Better yet, read up on the attractions you want to see the night before. The next day you can walk around, taking in the moment without your nose stuck in a book. This will also help you to be more aware of your surroundings. Scoundrels looking for an easy target will more likely leave you alone.
I've traveled like this in many cities. I can't tell you how many tourists have stopped me to ask for directions, just because I looked like I knew where I was going.
A few final words of advice.
When you travel to a new city, you're going to be a stranger in the city. Even if you dress like an expat for travel safety purposes, a close encounter with a local will reveal you as the stranger that you are in an instant. It's likely that you don't know the language and even if you do, you might have an accent.
The idea behind dressing like an expat is to conceal yourself in the crowds, out of sight from those with harmful intentions.