Scotland’s largest library was once known as the library of last resort: you were only allowed to use it if you could not find the information you were seeking anywhere else. Even then there was no guarantee that you’d be allowed in. You had to show that you had tried every other library, and uniformed security men at the “checkpoint Charlie” turnstyle could easily bar you from entering.

Visually, the National Library of Scotland’s austerity - the building’s pre-war design excludes windows on its high frontage - seemed to echo an intimidatingly authoritarian approach to learning. Its architect Reginald Fairlie described it as possessing “an air of frigid serenity” and its message seemed to be that it would rather receive academics, historians and members of the establishment than anyone from the hoi polloi.

No doubt much of this perception emanated from the fact that the NLS collection grew out of the Library of the Faculty of Advocates, which formally opened in 1689. This was presented to the nation and the NLS formally constituted by an Act of parliament in 1925. Building was started in 1938 but was interrupted by World War II and completed in 1956. The National Library of Scotland is one of only six legal deposit libraries in the UK and Ireland, and has been answerable to the Scottish Parliament and funded by the Scottish Government since 1999. The precious items it stores are spread over 15 floors, with another airport hangar-sized repository on Causewayside nearby.

Recently, however, a massive culture change has been going on behind the NLS’s art deco doors on Edinburgh’s George IV Bridge. Digitisation of the library’s 14 million printed items, seven million books, and two million maps is underway to help make the collection more accessible to the public.

An interactive exhibition of the John Murray archive brings to life the famous authors published by the enterprising Scot. But perhaps a more tangible signal of change is the new visitor centre, which opened last month to display hitherto unseen treasures such as the Robert Burns’ handwritten account of the 1715 Battle of Sheriffmuir, and the Order of the Massacre of Glencoe - alongside a brand new cafe and shop. Now the once-silent entrance hallway has open access from the street, and the airy space echoes to the clatter of cutlery and laptop keyboards. Young men chat on mobile phones to arrange dinner parties, while girls drink coffee and surf the net. The noise levels are high.

Martyn Wade, CEO of the NLS since 2002, is unfazed. In fact, he is visibly delighted at having to raise his voice to be heard over the din. The convivial 54 year old, a self-confessed foodie and motorcyclist, specialised in access while studying for his Bachelor of Librarianship degree at Newcastle Polytechnic (he went on to gain a Master of Librarianship at Aberystwyth University). He then embarked on a 25 year career in the public library sector in the London Borough of Sutton, and in Leicestershire and Cambridgeshire, and was formerly Head of Libraries, Information and Learning with Glasgow City Council.

“I find it absolutely amazing that a library could turn anybody away,” he says. “It’s a fundamental principal that public libraries are here for the people. To me, a democratic society rests upon free access to knowledge, to allow people to make informed decisions and act as citizens.”

The welcoming entrance hall, plus a rolling programme of exhibitions and events, represents phase one of Wade’s long-term mission to make the world-class collection more widely accessible. Phase two is the ongoing digitisation of all of Scotland’s published record - a term which means anything that is made available in Scotland, including foreign and specialist newspapers and magazines. Devolution, he says, has had a significant impact on Scottish identity both at home and abroad.

“Many people use the library to find out more about their family roots,” he says. “As a deposit library we cannot lend, so we aim to digitise as much of the collection that can be digitised. It will take decades, so we’re focusing on prioritising certain areas such as old maps (which can be overlaid on Google Maps for comparison), manuscripts and precious historical documents.”

The NLS website is used by some 2.5m researchers - a figure that could mushroom. Thanks to copyright law as it stands, however, nothing younger than 75 years old can be digitised, which means that researchers looking for anything published after 1925 still have to come into the building.

To say that’s a lot of material is something of an understatement. The NLS receives some 6000 new items every week at its repository at Causewayside, acquired either through purchase, donation or legal deposit. While many of these are items of historical interest, a huge number are contemporary publications such as newspapers, theatre programmes and playbills, and - perhaps more surprisingly - ephemera such as Edinburgh Festival Fringe fliers. These, says Wade, are the historical items of the future.

Wade speaks of knowledge as a “continuum” and, looking from the published past to the electronic future, the sense of infinity is palpable. Ancient publications are stored here as one-off single copies, while electronically produced knowledge is being created by countless ordinary people every second. The need to find ways of capturing what Wade refers to as “citizen created knowledge”, such as community publications and local history websites, is as real and urgent as academic and specialist works.

He says: “We collect for the future as well as for researchers today. One of our key strengths is that we have material that is 300 years old. In 300 years’ time people will be looking over 600 years’ worth of collections. It’s important that we keep a sample of everything published today in order to show what people are doing and what they are interested in. What is popular in one generation isn’t in another, and that’s impossible to predict. For example, Cosmopolitan magazine was considered quite racy when it was first launched here in the 1970s but looking back it was probably one of the best records of women’s issues around. What is being performed on stage now is already very different to what was being performed in the 1980s. So we have to have a range of publications.”

He is keenly aware that while in the past publishing anything required a lot of money, thus restricting the number of books printed, people can now publish freely on the web. “Most recorded knowledge was created by academics, but people are now creating knowledge all around, and the internet enables them to actually record that knowledge,” he says. “The whole new phenomenon of citizen created knowledge is becoming increasingly important in terms of what we collect, as it supplements academic knowledge and reflects changes in society.

“It is estimated that by 2020 some 80% of academic research will only be published electronically - which means that how people use the NLS collections will change too.”

Licensing the legal deposit of “born digital” publications is an ongoing but important challenge to ensure they are still to be available in 300 years’ time. These include online versions of newspapers which often contain information and moving images that are not in the published version, as well as such works as academic resources and market research reports. Websites, too, which Wade says “have a lifetime akin to that of a fruitfly”, are also in his sights.

The NLS has recently been tasked with preserving the Scottish Parliament and the Scottish Government website because material was being lost. “If that information was being lost, just think what else is disappearing by the day,” he remarks. “We want to find out how we can capture the knowledge not just of experts but also of the man in the street.

“We have to collect what’s published digitally as well as what’s published in print, otherwise we’ll be collecting an ever smaller proportion of the knowledge of Scotland, because more and more is published digitally.”

As he contemplates his monumental mission to democratise knowledge and devolve it to the people, Wade suddenly breaks into a boyish giggle. “Exciting isn’t a word you’d often use for a library,” he says, “but this is terrifically thrilling, because it’s new territory. The National Library of Scotland has the potential to be the best digital national library in the world.”