The Library of Babel


A re-creation of Borges’ Library of Babel, explorable from your web browser.

An illustration of the library

The Library of Babel is a short story written by Jorge Luis Borges.

It describes a library made up of an “indefinite, perhaps infinite” number hexagonal of rooms, each lined on four sides by a bookshelf of five shelves, each self containing thirty-two books. Each book is four hundred and ten pages of forty lines, each line of eighty characters.

The character set in these books is limited to the twenty-six lower-case letters of the English alphabet, the comma, the full-stop, and the space.

In its pages, the library contains every possible combination of these characters. No two books are the same — meaning that the library is “total — perfect, complete, and whole”. Everything that ever has been, or ever will be written using these twenty-nine characters is contained somewhere within the library.

Screenshot of a page on the site

This project aims to create a virtual version of the library that can be explored from a web browser. Each unique, random page is addressed by its location within the library, and will remain at that same address forever.

The library can be searched, so you can look up some text from a book, a song, a poem or simply make something up — and find where it resides in the library.

For a more detailed explanation on how it works, see the README file in the GitHub repository. To explore the library, visit the link below.

Header image source

Want to get in touch? You can email me at or message me via Twitter at @tdjsnelling.

You can also check out more work over at GitHub.