MUSEUMS USED TO stand for something old, dusty, boring and barely relevant to real life. Those kinds of places still exist, but there are far fewer of them, and the more successful ones have changed out of all recognition. The range they cover has broadened spectacularly and now goes well beyond traditional subjects such as art and artefacts, science and history (for a sample of oddball specialities, see chart). One of the biggest draws is contemporary art.

To be sure, museums remain showcases for collections and repositories of scholarship, but they have also become pits of popular debate and places where children go for sleepovers (pictured, above, at the British Museum). They are no longer places where people look on in awe but where they learn and argue, as they would at universities or art schools. Sir Nicholas Serota, director of Britain’s Tate galleries, describes the museum as “a forum as much as a treasure box”.

The statistics suggest that these new-look museums are doing something right. Globally, numbers have burgeoned from around 23,000 two decades ago to at least 55,000 now. In 2012 American museums received 850m visitors, says the American Alliance of Museums. That is more than all the big-league sporting events and theme parks combined. In England over half the adult population visited a museum or gallery in the past year, the highest share since the government began collecting such statistics in 2005. In Sweden three out of four adults go to a museum at least once a year (though not all Europeans are equally keen). The Louvre in Paris, the world’s most popular museum, had 10m visitors last year, 1m more than in 2011. China will soon have 4,000 museums—still only a quarter the number in America, but it is racing to catch up.

A world of choices

On the face of it, that success seems surprising. People now have more choices than ever before in how to spend their leisure. Many travel to see the world, but mostly the world comes to them, often via television and the internet, conveniently delivered to their laptops or smartphones. So why would they want to traipse round museums if most of the stuff they can see there is available at the click of a mouse?

Some of the new enthusiasm for museums is explained by changes in demand. In the rich world, and in some developing countries too, the share of people who are going on to higher education has risen spectacularly in recent decades. Surveys show that better-educated folk are a lot more likely to be museum-goers. They want to see for themselves where they fit in the wider world and look to museums for guidance, which is why so many of these places have been transformed from “restrained containers” to “exuberant companions”, as Victoria Newhouse writes in her book, “Towards a New Museum”.

In developed countries museums are being championed by a wide variety of interest groups: city fathers who see iconic buildings and great collections as a tourist draw; urban planners who regard museums as a magic wand to bring blighted city areas back to life; media that like to hype blockbuster exhibitions; and rich people who want to put their wealth to work in the service of philanthropy (“a way for the rich to launder their souls”, as one director put it). For young people they are a source of something authentic and intriguing when their electronic entertainments start to pall.

In the more affluent parts of the developing world, too, museum-building has flourished, driven mainly by governments that want their countries to be regarded as culturally sophisticated (though wealthy private individuals are also playing a part). They see museums as symbols of confidence, sources of public education and places in which a young country can present a national narrative. Visitor numbers in such countries are also rising fast, boosted by a growing middle class. Some hope to use cultural offerings to attract many more foreign tourists. In Qatar and Abu Dhabi, for instance, a clutch of new museums under construction is meant to turn the Gulf into a destination for visitors from Europe, Russia and South Asia. Chinese museums received more than 500m visits last year, 100m more than in 2009.

A time for worship

Less than a century ago Benjamin Ives Gilman, who served as secretary of the Boston Museum of Fine Arts for over 30 years, published a personal manifesto, “Museum Ideals: of Purpose and Method”, in which he urged curators to treat museums as having a holy purpose. Collections should be contemplated for their aesthetic qualities alone, he argued, with no need for narrative, context or explanation. The best place to do that was in the rarefied surroundings of a museum. “A museum of art”, he wrote, “is in essence a temple.”

The demolition of the temple started with the opening of the Pompidou Centre in Paris in 1977. Renzo Piano and Richard Rogers turned the museum’s architecture inside out, literally and metaphorically. They put the utilitarian air shafts and escalators on the outside of the building and painted them in bright primary colours instead of hiding them away. Inside, visitors were encouraged to move from the permanent collection to the library and back again, and in and out of the special exhibitions. As if to emphasise that this museum was about having fun as much as about displaying art, jugglers and men on stilts entertained visitors all over the museum plaza in the fashionable Marais district. Ever since, cities have been vying to put up increasingly adventurous museum buildings and entire quarters to stake their claim as cultural centres (see article).

Not all of what Gilman stood for has been swept away. When the British Museum (BM) opened in 1759, it proclaimed itself as the world’s first independent national museum “for all studious and curious persons, both native and foreign-born”. That remains its aim. But whereas in Gilman’s day curators reigned supreme, now they have to enchant visitors rather than lecture them. Museums offer narratives in their exhibitions, provide a context for objects by linking them to other people and other places, work with digital experts to enable visitors to participate as well as watch and listen, and create innovative public programmes to bring in the young and the inexperienced.

According to Kenneth Hudson, a British museum trendspotter and author of “Museums of Influence”, “the most fundamental change that has affected museums is the now almost universal conviction that they exist in order to serve the public.” Some people may turn up their noses, fearing that some of what goes on in museums these days is getting too close to being mere entertainment. But modern visitors like being entertained, and are likely to drift away unless museums can connect with them both intellectually and emotionally.

The money for all this comes from a variety of sources. Some institutions were privately founded and continue to be privately funded, others are entirely state-financed. In recent years public funding throughout the developed world has been squeezed, so museums have had to become more adept at raising money themselves, and the barriers between the two traditional funding models have become more fluid. Most institutions in Europe, America and Australia now live on a mix of public, corporate and individual support. Even in Germany, where culture has traditionally been seen as the responsibility of the state, the climate is getting harsher. The main museums in Berlin are now expected to raise at least 8.5% of their annual operating budget in ticket sales and sponsorship.

One handy source of income is to make loans of artworks to galleries abroad. Berlin’s Gemäldegalerie has been able to raise €1m ($1.3m) by lending its two Vermeers to museums in Japan. The Picasso Museum in Paris raised €30m of the €50m it needed for its current makeover from lending works to museums abroad. Axel Rüger, director of the Van Gogh Museum in Amsterdam, says he has a list as long as his arm of foreign museums clamouring to borrow some of his most famous paintings.

A big institution such as the BM costs about £100m ($160m) a year to run, of which 40% goes on staff alone. Every pound from the Treasury is more than matched by a pound the museum raises itself. Admission charges for public museums in Britain were scrapped by a Labour government in 2001, though museums mostly ask for voluntary donations. But the BM has also made great efforts to strengthen its marketing and fund-raising and to sell its expertise. One way of doing that is to provide consultancy services to new foreign museums; a contract with the Zayed National Museum in Abu Dhabi, which will open in 2016, is thought to be earning the BM as much as £10m a year.

How to win Friends

Museums in America have traditionally been supported by rich individuals offering private endowments, but even there museums enjoy some state largesse in the form of tax breaks for donors and lenders, as well as rules favouring not-for-profit organisations (see main chart above for a breakdown of America’s museum finance). Other than in New York and Chicago, entrance fees as a source of income are becoming increasingly insignificant. When at the Dallas Museum of Art they shrank to just 2% of annual income, the trustees approved the launch of a radical new scheme: visitors sign up to a membership programme known as DMA Friends that gives them free admission if they provide their names, e-mail addresses and zip codes. Since January 35,000 people have joined, and they are signing up at a rate of 800 a week. The personal information they provide is overlaid with details from the census, allowing the museum to work out who their visitors are and exactly where they come from. Philanthropists love the scheme because it makes the use of their money more transparent.

Not all museums are doing equally well. Landmarks such as the Metropolitan Museum of Art in New York, the BM, the Louvre and the newly refurbished Rijksmuseum in Amsterdam steam on at full capacity. Small local museums also enjoy strong support from their communities. But historic houses and history museums are less popular than they used to be, and museums that cater for young visitors now have to compete with an array of other attractions.

And all museums, whether privately financed or funded by the state, are affected by the economic cycle. In Spain, for example, public funding has been slashed, so the many new museums that have been built in the past two decades are now struggling to cover their running costs. And in cities whose economic fortunes have declined, museums suffer too. Detroit has $18 billion-worth of debt, and on December 3rd was granted protection from its creditors. One proposal being considered for raising money is that it sell its fine collection of paintings by Bruegel the Elder, Van Gogh and Matisse, valued at $1 billion a decade ago.

Even so, new museums are still being opened every day, and in the West most of them are for contemporary art, because that seems to be the biggest draw just now.

Next in The Economist's special report on museums: The Bilbao effect (2/5)

John Micklethwait, the editor of The Economist, is a trustee of the British Museum. He played no part in editing this special report.