The next night I checked into the Independente, the two-year-old hostel in the majestic town house that once housed the Swiss ambassador. Climbing the sweeping stone staircase, it seemed as if I was ascending to some sort of hostel heaven. A skylight filtered white light as I passed through a soaring lounge deployed with Barcelona chairs and an Arne Jacobsen swan chair. My top-floor suite featured an impeccable bathroom. Standing on the outdoor terrace high above Lisbon was like perching on a cloud. Portuguese vintages waited in the lobby bar, and slow-braised pork cheek beckoned from the restaurant. True, I had shelled out 80 euros. But I have paid twice that amount and received half as much at many conventional hotels.

At the wine tasting at the bar, a cozy spot adorned with vintage typewriters and wall maps, I met Elaine Corets, a 53-year-old “urban farmer” from Seattle. It was her first time in a hostel since a 1987 trip to Bangkok, she said. Though she was in one of the 11 shared rooms, she was upbeat.

“I’ve got a superclean comfortable bed,” she said. “The room is long and wide with a high ceiling, and you can see the sunrise through the big windows.”

If Lisbon is the pioneer, Barcelona is the boomtown. Innovative hostels are popping up all over the Mediterranean city of Gaudí’s buildings, tapas bars and street art.

Sant Jordi Gracia is a self-described “boutique hostel designed for the cosmopolitan hipster and fixed-gear bicycle aficionado.” It joins the Sant Jordi Sagrada Familia, from the same chain that trumpets itself as “the first skateboard themed hostel in Barcelona.” And near the lovely stone facades and luxury boutiques of Passeig de Gràcia, I found Generator Barcelona, which opens May 14. Occupying a tall 1960s office building, the hostel was still a chaos of forklifts and plaster dust when I visited. The roof was being readied with solar panels and a panoramic sun deck. The top floor would contain accommodation “that could host a rock star visiting for a weekend,” in the words of Mr. Michel, Generator’s executive chairman.

My hostel, Violeta Boutique, was hidden in the middle floors of a 19th-century stone building near the shopping boulevard of Avinguda del Portal de l’Angel. Created last year, the place represents a subtrend in haute hosteling: an offsite annex of swish private rooms set up by an established traditional hostel — in this case the Violeta Hostel.

My room (75 euros) was painted in sea-foam green and cool gray, enlivened by a bright orange private bathroom. Best, a glassed-in sunroom beckoned with cushioned chairs. It was the ideal spot to savor my welcome gift: a chilled bottle of cava.