There is no 100% safe city in the world but Istanbul is generally pretty safe and petty crime is low
So if you plan to travel alone (Solo traveler) to Istanbul, here are some tips that may help you
1- Be careful around the Old Town as pickpocketing and bag snatching can happen
2- Avoid hanging out solo in Taksim late at night (after 10 pm)
3- Stay in hotel in the old city (tourism area) like: Sultanahmet, Gulhane, Sishane, Nistantasi, Besiktas, Ortakoy and Sisli
4- Take shuttle from the airport
5- Use taxi application to call a taxi rather than take it from the street
6- Make sure you have plenty of smaller currency bills to pay for taxis
0