Skip to main content

Digital Library of Babel contains every book that has ever been (and ever could be) written

digital library of babel contains every possible book ever librarybabel
Roman Boed/Flickr
In his infamous short story The Library of Babel, author Jorge Luis Borges presents readers with an interesting thought experiment. The story is centered around fictional library that contains every possible combination of all the letters of in the alphabet, in a massive collection of 410-page novels. Because the collection contains every possible combination of characters, the library holds not only every book that has ever been written, but also every book that could ever be written.

The only problem is that, in addition to the complete works of Shakespeare, Voltaire, and every other author who has ever been born; the library also contains a staggeringly large amount of incomprehensible gibberish. Many of the permutations of alphabetic characters are totally random strings of letters, so a large portion of the library’s books are pure nonsense. There’s also no effective way to organize so many volumes of worthless dribble, so in the story, the librarians who maintain the collection quickly lose their minds trying to reign in the unfathomably large amount of nonsensical books.

It’s a fascinating story, but the thing is, a library of this size could never actually exist in the physical world. The Library of Babel would have contained 1.9×10^1834097 books, which is astronomical compared to the 22 million (2.18×10^6) found in some of the world’s biggest brick-and-mortar libraries. Clearly, a physical Library of Babel would be impossible to build — but what if the library could exist digitally?

This very idea is what inspired artist and programmer Jonathan Basile to create a digital version of the Library of Babel. His library contains a massive collection of digital novels (currently 10^4677 and counting), all of which are are 410 pages long, and contain a completely random arrangement of letters. The tricky part is that even this digital version of the Library of Babel has much too large a footprint for any practical storage or accessibility. Basile discovered that just one million books required almost two terabytes of space, so he quickly recalculated with a new approach.

Using random number generators and a reversible seed-style page generator similar to the ones used by search engines and library systems, visitors call up entries in the digital library using algorithms run backwards to search the database. In plain English, this means that any user who searches for a phrase or string of text in the library receives a freshly generated “copy” of that text from the seed that held its place on the digital shelves.

The system works the same way if a library visitor selects a random result from the site’s search function, although true to the story’s philosophy, much of what you’ll find is nonsensical strings of letters. Users more interested in browsing the library shelves can sort through a simple visualization of the Library of Babel’s hexagonal chamber system, selecting walls of books, specific shelves, and then names on the spines. Basile understands that the concept of a universal library has its dangers, and the site includes a forum where users and fans can discuss the library’s philosophical implications, as well as real-world legal issues like plagiarism, copyright laws, and the impact the library might have on the publishing industry.

If you’re less concerned with the legal and philosophical issues in play, you can still get a kick out of the library’s enormity. You can search for your own writing in the library, or even stories about your birth, your death (or someone else’s birth or death, regardless of whether or not those events have happened yet). It gets spooky fast.

Editors' Recommendations

Chloe Olewitz
Chloe is a writer from New York with a passion for technology, travel, and playing devil's advocate. You can find out more…
Digital Trends’ Top Tech of CES 2023 Awards
Best of CES 2023 Awards Our Top Tech from the Show Feature

Let there be no doubt: CES isn’t just alive in 2023; it’s thriving. Take one glance at the taxi gridlock outside the Las Vegas Convention Center and it’s evident that two quiet COVID years didn’t kill the world’s desire for an overcrowded in-person tech extravaganza -- they just built up a ravenous demand.

From VR to AI, eVTOLs and QD-OLED, the acronyms were flying and fresh technologies populated every corner of the show floor, and even the parking lot. So naturally, we poked, prodded, and tried on everything we could. They weren’t all revolutionary. But they didn’t have to be. We’ve watched enough waves of “game-changing” technologies that never quite arrive to know that sometimes it’s the little tweaks that really count.

Read more
Digital Trends’ Tech For Change CES 2023 Awards
Digital Trends CES 2023 Tech For Change Award Winners Feature

CES is more than just a neon-drenched show-and-tell session for the world’s biggest tech manufacturers. More and more, it’s also a place where companies showcase innovations that could truly make the world a better place — and at CES 2023, this type of tech was on full display. We saw everything from accessibility-minded PS5 controllers to pedal-powered smart desks. But of all the amazing innovations on display this year, these three impressed us the most:

Samsung's Relumino Mode
Across the globe, roughly 300 million people suffer from moderate to severe vision loss, and generally speaking, most TVs don’t take that into account. So in an effort to make television more accessible and enjoyable for those millions of people suffering from impaired vision, Samsung is adding a new picture mode to many of its new TVs.
[CES 2023] Relumino Mode: Innovation for every need | Samsung
Relumino Mode, as it’s called, works by adding a bunch of different visual filters to the picture simultaneously. Outlines of people and objects on screen are highlighted, the contrast and brightness of the overall picture are cranked up, and extra sharpness is applied to everything. The resulting video would likely look strange to people with normal vision, but for folks with low vision, it should look clearer and closer to "normal" than it otherwise would.
Excitingly, since Relumino Mode is ultimately just a clever software trick, this technology could theoretically be pushed out via a software update and installed on millions of existing Samsung TVs -- not just new and recently purchased ones.

Read more
AI turned Breaking Bad into an anime — and it’s terrifying
Split image of Breaking Bad anime characters.

These days, it seems like there's nothing AI programs can't do. Thanks to advancements in artificial intelligence, deepfakes have done digital "face-offs" with Hollywood celebrities in films and TV shows, VFX artists can de-age actors almost instantly, and ChatGPT has learned how to write big-budget screenplays in the blink of an eye. Pretty soon, AI will probably decide who wins at the Oscars.

Within the past year, AI has also been used to generate beautiful works of art in seconds, creating a viral new trend and causing a boon for fan artists everywhere. TikTok user @cyborgism recently broke the internet by posting a clip featuring many AI-generated pictures of Breaking Bad. The theme here is that the characters are depicted as anime characters straight out of the 1980s, and the result is concerning to say the least. Depending on your viewpoint, Breaking Bad AI (my unofficial name for it) shows how technology can either threaten the integrity of original works of art or nurture artistic expression.
What if AI created Breaking Bad as a 1980s anime?
Playing over Metro Boomin's rap remix of the famous "I am the one who knocks" monologue, the video features images of the cast that range from shockingly realistic to full-on exaggerated. The clip currently has over 65,000 likes on TikTok alone, and many other users have shared their thoughts on the art. One user wrote, "Regardless of the repercussions on the entertainment industry, I can't wait for AI to be advanced enough to animate the whole show like this."

Read more