The Library of Babel, which contains all possible combinations of letters, forming mostly nonsense books. "The universe (which others call the Library) is composed of an indefinite and perhaps infinite number of hexagonal galleries, with vast air shafts between, surrounded by very low railings. From any of the hexagons one can see, interminably, the upper and lower floors. The distribution of the galleries is invariable. Twenty shelves, five long shelves per side, cover all the sides except two; their height, which is the distance from floor to ceiling, scarcely exceeds that of a normal bookcase. One of the free sides leads to a narrow hallway which opens onto another gallery, identical to the first and to all the rest."
"From these two incontrovertible premises he deduced that the Library is total and that its shelves register all the possible combinations of the twenty-odd orthographical symbols (a number which, though extremely vast, is not infinite): Everything: the minutely detailed history of the future, the archangels' autobiographies, the faithful catalogues of the Library, thousands and thousands of false catalogues, the demonstration of the fallacy of those catalogues, the demonstration of the fallacy of the true catalogue, the Gnostic gospel of Basilides, the commentary on that gospel, the commentary on the commentary on that gospel, the true story of your death, the translation of every book in all languages, the interpolations of every book in all books."
In Otherland, there is a house the size of a world:
"Her first disconcerting realization was that they were not above much of the house at all, but only partway up one of the lower structures. The sky was real, but it was visible only between two other wings of the building, both of which rose far above their vantage point...The other disturbing thing was that there were no grounds to be seen whatsoever, except for a few glimpses lit by angling sunlight of roof gardens nestled between cupolas, or even one tucked into the wreckage of an ancient, broken dome. Instead, the house continued as far beyond the window as she could see, a stunning conglomeration of halls and towers and other structures for which she had no names, all connected in a labyrinthine whole, rooftops and chimneys spreading away and growing smaller and smaller with distance, an undifferentiated, choppy sea of gray and brown shapes that at last grew dim in the fading golden light."
The kitchen is staffed by entire tribes who have never left it. There are endless hallways and rooms the size of aircraft hangers within rooms. The masters of the house are distant rumors. In that house is a library populated by monks:
"Shelves lined the Library from floor level all the way to the ceiling, dozens and dozens of shelves mounting upward until, like an art-class perspective exercise, they seemed to have no space left between them. Every single one was jammed from one side to another with books, so that the walls of the vast room had become abstract mosaics tiled in multicolored leather book spines. Enormously long ladders stood in some places, stretching many meters from the floor up the vertical facing of the book-cliffs; other, smaller versions dangled between one row of higher shelves and another, perhaps simplifying the journeys of scholars or clerks who had to move back and forth between the same spots many times. But in some spots along the immense shelves the only way to get to certain locations appeared to be along frighteningly crude rope bridges, one strand for the feet, the other chest high, the long, sagging cables rooted on platforms built in the room's corners. It was not the only use of rope: from the floor to a height of perhaps two stories the shelves were protected from theft and depredation by nets of knotted silk, so that the books could be seen but not touched or removed. The steep vertical shelves were acrawl with people in gray robes.... Quietly purposeful as bees on a honeycomb, these dark-robed figures repaired the book net where a cord had frayed or a knot had been cut, or moved carefully along the upper walkways. At least two dozen leaned out from ladders at various points along the shelves, wielding long-handled dusters."
From Lev Grossman's The Magicians:
"Quentin had spent very little time in the Brakebills library. Hardly anybody did if they could help it. Visiting scholars had been so aggressive over the centuries in casting locator spells to find the books they wanted, and spells of concealment to hide those same books from rival scholars, that the entire area was more or less opaque to magic, like a palimpsest that has been scribbled on over and over, past the point of legibility.
To make matters worse, some of the books had actually become migratory. In the nineteenth century Brakebills had appointed a librarian with a highly Romantic imagination who had envisioned a mobile library in which the books fluttered from shelf to shelf like birds, reorganizing themselves spontaneously under their own power in response to searches. For the first few months the effect was said to have been quite dramatic. A painting of the scene survived as a mural behind the circulation desk, with enormous atlases soaring around the place like condors. But the system turned out to be totally impractical. The wear and tear on the spines alone was too costly, and the books were horribly disobedient. The librarian had imagined he could summon a given book to perchon his hand just by shouting out its call number, but in actuality they were just too willful, and some were actively predatory. The librarian was swiftly deposed, and his successor set about domesticating the books again, but even now there were stragglers, notably in Swiss History and Architecture 300-1399, that stubbornly flapped around near the ceiling. Once in a while an entire sub-sub-category that had long been thought safely dormant would take wing with an indescribable papery susurrus."
and the sequel: "The library was still plagued by outbreaks of flying books—three weeks ago a whole flock of Far Eastern atlases had taken wing, terrifyingly broad, muscular volumes like albatrosses, and wrecked the circulation area, sending students crawling under tables. The books actually found their way out through the front door and roosted in a tree by the welters board, from which they raucously heckled passersby in a babel of languages until they got rained on and dragged themselves sulkily back to the stacks, where they were being aggressively rebound."
The Unseen Library from Discworld:
"The Library was the greatest assemblage of magical texts anywhere in the multiverse. Thousands of volumes of occult lore weighted its shelves.
It was said that, since vast amounts of magic can seriously distort the mundane world, the Library did not obey the normal rules of space and time. It was said it went on forever. It was said that you could wander for days among the distant shelves, that there were lost tribes of research students somewhere in there, that strange things lurked in forgotten alcoves and were preyed on by other things that were even stranger.1
Wise students in search of more distant volumes took care to leave chalk marks on the shelves as they roamed deeper into the fusty darkness, and told friends to come looking for them if they weren't back by supper.
And, because magic can only loosely be bound, the Library books themselves were more than mere pulped wood and paper.
Raw magic crackled from their spines, earthing itself harmlessly in the copper rails nailed to every shelf for that very purpose. Faint traceries of blue fire crawled across the bookcases and there was a sound, a papery whispering, such as might come from a colony of roosting starlings. In the silence of the night the books talked to one another."
The Name of the Rose describes a library filled with smoke and mirrors, where the lost works of Aristotle can be found. The library is in the shape of a maze that represents the world.
The Beast's library, in Robin McKinley's Beauty, contains all the books that have yet to be written.
One section of Dream's library, in Sandman, contains "all the books their authors never wrote, or never finished, except in dreams." Titles include Tolkein's The Lost Road, Alice's Journey Behind the Moon, Psmith and Jeeves, and The Dark God's Darlings by Lord Dunsany.