Yes, Lima is safe for tourists, especially if you stay in Miraflores. Of course, like in any major city, there is a risk of pickpockets and theft. Be mindful at night and take transportation rather than walking.