Washington, D.C., is a fairly safe city, but as with any major metropolitan area it's best to stay alert. Keep an eye on purses and backpacks, and be aware of your surroundings before you use an ATM, especially one that is outdoors. Move on to a different machine if you notice people loitering nearby. Assaults are rare but they do happen, especially late at night in Adams Morgan, Capitol Hill, Northeast D.C., and U Street Corridor. If someone threatens you with violence, it's best to hand over your money and seek help from police later.
Public transportation is quite safe, but late at night, choose bus stops on busy streets over those on quiet ones. The DowntownDC Business Improvement District's free guardian angel SAM service will walk you to a taxi, Metro, or your car until 9:30 pm May to October (until 7:30 pm November to April); just call their dispatch service. They operate in the White House area, part of Capitol Hill, Downtown, Penn Quarter, and Chinatown.