Many hotels continue to charge mandatory “resort” and “facility” fees, padding profits and making price comparisons harder for travelers. These extra charges—usually $20 to $40 per night—aren’t included in the per-night rates displayed in search results on travel booking websites nor on the initial per-night pricing shown on hotels’ own sites.

Hotels have long charged outrageous prices for extras. But when you pay $60 a night to park or $20 for a club sandwich, you get something—or can decline to buy. What do these mandatory resort fees get you? Hotels usually say they cover things like business centers, WiFi, gyms, unlimited phone calls, and small perks like a few bottles of water.

Even when resorts charge these fees, their claims for what they cover don’t add up. Why do guests have to pay extra to cover a resort’s costs of maintaining a pool or supplying beach chairs, especially when those amenities were advertised as reasons to stay there? And guests who don’t partake of fitness centers or free coffee can’t waive these fees.

For hotels, these fees add up to nearly $3 billion in extra revenue a year, according to Consumer Reports—a windfall they don’t share with booking sites and that usually gets taxed differently or not at all.

Consumers’ Checkbook’s researchers researched rates for 75 sample stays at three-, four-, and five-star hotels in major cities and found that 48 of the 75 hotels charged resort or facility fees, ranging from $2 to $60 per night; on average, mandatory hotel fees added $27 a night to our stays.

Although most booking websites now display all-in pricing in their search results, including all taxes and fees, you can’t sort or filter on those dollar amounts, making true price comparisons difficult. And often, surcharges turn a seemingly good deal into a bad one. For example, when we searched for a five-night stay at four-star hotels in Las Vegas, we spotted what looked like a great deal: $102 per night at the New York-New York Hotel & Casino. But that price didn’t include the property’s whopping mandatory fees totaling $41.95 a night.

When we shopped for our 75 days across 25 booking websites (including those of the hotels), we found that mystery deals offered by Hotwire and Priceline consistently netted us the best hotel rates—but we found hidden fees there, too. Both have service fees that they lump in with sales tax at checkout, making their per-night rates considerably higher than what you’ll see in initial search results.

Similar hidden fees lurk at Airbnb and Vrbo, where the per-night rate advertised is far less than the actual one you’ll pay once management, cleaning, and “additional guest” fees are tacked on, often adding hundreds of extra dollars.

Resort fees are an example of “drip pricing”—you see one price, then, before you know it, you’re paying more. In some countries, hotels are barred from doing this. We think the practice is an illegal bait-and-switch. So did the Attorney General’s office for Washington, D.C., which a few years ago filed a civil lawsuit against Marriott for price deception. Nebraska’s A.G. filed a similar suit against Hilton. These cases were settled and the hotel companies agreed to disclose mandatory fees more prominently, as part of their total prices in initial search results; yet they continue to charge and poorly disclose them.

We think hotels and travel booking websites should provide their customers with upfront all-in pricing and allow customers to sort and filter those actual costs. The only reason hotels list them separately from per-night rates is to hide these extra costs and to make price comparisons more difficult.

The federal Junk Fee Prevention Act would require hotels and other sellers to disclose all-in pricing, effectively eliminating these problems. It seems unlikely that Congress will pass that bill, but California had proposed its own similar law.

What can you do? When researching rates, compare bottom-line prices. If you stay at a hotel with a resort fee that wasn’t disclosed when you booked, demand it be removed from your final bill or dispute those costs with your credit card company.

Become a Smarter Consumer Get free, expert advice delivered to your inbox every Wednesday when you sign up for the Weekly Checklist newsletter.