You can find both dingy places and places that look like a really nice hotel, in Tokyo. Here are some of the nice places which have only female floors, so that should make you feel safe. I hear that they're becoming pretty popular.
The Prime Pod Ginza https://theprimepod.jp/ginza/en/
Nine Hours Shinjuku North https://ninehours.co.jp/en/shinjuku-north/
Oak Hostel Cabin https://oakhostel.com/jpn/cabin/
Grids Hostel + Lounge https://grids-hostel.com/sp/