The Library of Babel is a surrealist story set in a world made up of interlocking hexagons where humans have only rudimentary supplies except for books full of what the world's librarians presume to be random combinations of a set group of symbols. This means that most books are useless gibberish, but the librarians have not given up hope of finding the supposedly inevitable books containing useful information and coherent narratives.
Borges' narrator describes how his universe consists of an enormous expanse of adjacent hexagonal rooms, each of which contains the bare necessities for human survival—and four walls of bookshelves. Though the order and content of the books is random and apparently completely meaningless, the inhabitants believe that the books contain every possible ordering of just 25 basic characters (22 letters, the period, the comma, and the space). Though the vast majorityof the books in this universe are pure gibberish, the library also must contain, somewhere, every coherent book ever written, or that might ever be written, and every possible permutation or slightly erroneous version of every one of those books.
The narrator notes that the library must contain all useful information, including predictions of the future, biographies of any person, and translations of every book in all languages. Conversely, for many of the texts some language could be devised that would make it readable with any of a vast number of different contents.
Despite—indeed, because of—this glut of information, all books are totally useless to the reader, leaving the librarians in a state of suicidal despair. This leads some librarians to superstitious and cult-like behaviours, such as the "Purifiers", who arbitrarily destroy books they deem nonsense as they scour through the library seeking the "Crimson Hexagon" and its illustrated, magical books. Others believe that since all books exist in the library, somewhere one of the books must be a perfect index of the library's contents; some even believe that a messianic figure known as the "Man of the Book" has read it, and they travel through the library seeking him.