Budget sleeping has never been so cool.

So cool, in fact, that some hostels are now self-identifying as hotels.

When I wrote about them five years ago, the gist was that hostels — where guests typically pay for a bed vs. a room and share bathrooms, kitchens and other common areas — were trying to ditch their reputation. Historically, the hostel is known as a bare-bones and predictably grungy spot for funky (and I don’t mean hip) backpackers to sack out in Europe. But it’s been undergoing an extreme makeover. Hostels are growing in popularity in the United States, with properties that are squeaky-clean and rich in amenities, so artfully designed you could imagine them in a Dwell spread.

Those trends have only grown in the past five years, and I’m not surprised now to hear of hostels with swimming pools, handcrafted cocktails, art shows, live music, rooftop bars, curated tours, yoga classes and luxury suites. Kex, an Icelandic brand that opened a 29-room property in Portland, Ore., earlier this month, has a 12-person sauna and a complimentary European-style breakfast with housemade preserves and freshly baked bread. Like other properties in this new batch of hostels, Kex wants to attract travelers of all stripes, not just the backpacker, so it’s dealing with the image problem by avoiding “hostel” altogether, calling itself a “social hotel.”

Generator, the affordable luxury European brand with 14 locations, including in Amsterdam, Berlin and Paris (a D.C. location is set to open in January), once had “hostel” in its name, but dropped it when the company launched its first U.S. property last year in Miami’s South Beach.

“The name ‘hostel’ limited us too much,” said Alastair Thomann, Generator’s CEO. “I’m not sure if we’d kept it in whether Generator would have been as successful.” (He noted that the 2005 horror flick “Hostel” has done real damage to the perception of the hostel.) Generator has been so successful that in October, its parent company spent $400 million to acquire Freehand Hotels, a small U.S. hostel chain with a slightly more grown-up, intimate vibe than Generator. Both brands are known for their stunning, design-focused properties in hip urban neighborhoods; they’re boutique hotel-hostel hybrids with trendy restaurants and bars where guests can stay in bunk rooms or luxury private suites.

Regardless of the sleeping arrangements, Thomann said, all guests share the same experience. “You feel the hostel vibe when you walk in. Like-minded people meeting and exchanging stories.”

And while some travelers head to hostels because they’re still cheap (a bed in a 16-bunk room at Kex Portland, for instance, is $39; a bed in a 10-bed dorm at Generator Miami is about $32), the real hostel superpower is that collective experience, something you won’t find staying at budget hotels or Airbnbs. Hostels are designed to promote social interaction, and long ago, they mastered the art of communal living — the magic that happens when you’re away from home and connect with other travelers. Many hostel guests are solo travelers, and at a hostel, they can play table tennis, prepare a meal, break bread or explore the city with a stranger who soon feels like a friend.

The best hostels help travelers feel like locals, offering pub crawls, neighborhood walks and ways to experience the culture, always through connection with others, always on a budget. This ethos has even led industry giants to respond by rolling out properties with shared or linked smaller rooms and larger common areas (though neither is priced like or called a hostel). Marriott’s Element launched its new communal living room concept (four private guest rooms and shared space where guests can cook, collaborate and relax) at hotels in Scottsdale, Ariz., and Boulder, Colo., earlier this year. Motto by Hilton will open its first location in the District in 2020, featuring efficient guest rooms and the Motto Commons, a community hub that can accommodate food stalls, bars and local vendors.

Whether or not the hotel concepts are successful, the overhaul at hostels is moving full steam ahead. Matthew Kepnes, author of “How to Travel the World on $50 a Day,” said upgraded mattresses, privacy curtains, reading lights, high-speed WiFi, 24/7 reception, and power and USB outlets are all industry standards now. Kepnes, a partner at HK Austin, a hostel with vinyl record players and 500-thread-count sheets, said the market for these upgraded properties comes partly from millennials staying at nice hostels overseas and wanting that level of luxury domestically.

A mile west of HK, Native is an even swankier and pricier option, calling itself an “experimental hostel bringing the house party and hospitality under one moonlit roof.” Native has 66 beds in 12 rooms, swathed in dark, lavish colors and materials like black marble and brass. It hosts a weekly poetry slam and has a public bar, another growing trend.

San Francisco’s Music City Hotel offers amenities such as daily housekeeping and fresh towels, complimentary toiletries, and larger bunks. General manager Brian Davy said if Music City were called a hostel, business and older travelers might never discover the property; as a hotel, it welcomes many of both. Music City is expanding to include a restaurant, bar, rehearsal space, jam space and production booths, so music makers and lovers can come together and immerse themselves in a local music scene while staying on a budget.

Generator’s Thomann has noticed other trends within the changing hostel scene: the increase in solo female travel (the female dorms are Generator’s most popular) and the growth of spending on food and beverage.

“They’re spending 10 times more on their dinner than they did for their bed,” Thomann said, noting that guests check in with posh luggage and post pictures of their foodie meals on social media. “It’ll blow your mind how much they spend on dinner.”

Some of those dining dollars are spent in-house at Generator and Freehand, known for their splashy, cutting-edge food and drink offerings. Freehand has built a cult following at least in part because of the white-hot, James Beard Award finalist Broken Shaker bars at each location.

Of course, if you’re nostalgic for the pre-luxury scene, you can still find the hostel magic without artisan fare and glam dining rooms. When I stayed at the bustling HI New York City Hostel this fall, I rode the elevator with a chatty man who had just flown in from Egypt, and stretched in the austere fitness room with a senior from Charlottesville.

HI USA is part of Hostelling International, a nonprofit organization with thousands of hostels around the globe (there are close to 20,000 hostels worldwide), particularly popular among youth travelers. The New York property, located in a historic building on the Upper West Side, has a huge — by Manhattan standards — courtyard and community garden where I enjoyed takeout dinner, listening to conversations in other languages. Nearby, a lively trio of 20-something friends from different countries planned a trip to Bolivia and lamented their upcoming 30th birthdays, when, they predicted, their days of travel and fun would be over.

The hostel offers weekly welcome receptions, comedy nights and tours of Greenwich Village, Harlem and “Sex and the City” spots. Along with my Snoopy pajamas, I’d packed earplugs (which I didn’t need), shower shoes (which I did) and a padlock (a necessity, since hostels generally have one locker per bed; most will sell you a lock if you don’t bring one). When I checked in, I got my bunk assignment, a key card and a flier with 10 safety tips, such as don’t flash your money in public places and be aware of your surroundings, especially when using or storing valuables.

While far from luxury, even HI is sprucing up its properties and adding high-tech features like charging ports in lockers and shower heads that change color to encourage guests to save water. HI’s locations are often in repurposed buildings, some pretty spectacular: HI Pigeon Point Lighthouse Hostel, at the foot of a 115-foot-tall lighthouse in Pescadero, Calif., has a cliffside hot tub and outdoor seating with a fire pit; and HI San Francisco Fisherman’s Wharf is in Fort Mason, part of the Golden Gate National Recreation Area, overlooking Alcatraz and serving local beer and wine.

After a quiet night in my bunk, I grabbed a mediocre, foil-wrapped breakfast sandwich from the hostel cafe. But it hardly mattered, for I was so engrossed in conversation with Fabrizio, a young engineer from Brazil who was visiting the United States for the first time and said Americans are far nicer in person than on TV. He was halfway through his six-night stay at the hostel, and we talked about highlights in the city; one of his was a Giants game for $70 — almost double the cost of his room.

“I like to do things when I can, even if they’re expensive,” he said, practicing his English. “I can always earn the money back later.”

Kaplan is a freelance writer based in the District. Her website is melaniedgkaplan.com. Find her on Twitter: @melaniedgkaplan