Whether you can enter a hotel just to use the bathroom depends largely on the hotel's individual policy and the "vibe" of the establishment. Legally, hotels are private property, and while they are "places of public accommodation," they generally have the right to restrict facilities like bathrooms and gyms to paying guests only. Many luxury or high-end hotels (4 and 5-star properties) tend to be more lenient as a matter of "goodwill" and high-level service; they may allow a polite non-guest to use the lobby facilities to maintain a sophisticated reputation or in the hope that you might be a future customer. However, in busy city centers or budget hotels, you will often find signs stating "Restrooms for Guests Only," and some may even require a room key or a code provided by the front desk to enter. Generally, if you are well-dressed, polite, and ask the concierge or receptionist nicely, most hotels will point you in the right direction. It is always a courtesy to look for a public lobby restroom rather than wandering into guest-only floors, which would be considered trespassing.