The Infinite Book

A randomly generated infinite book containing all of humanity's knowledge! Every string that can be written already exists somewhere in it, at a precise position. Pages are generated on the fly when you open them.

95 characters4 242 per page∞ pages

Every page exists: pick any positive integer, as large as you like.

How it works

  1. 1Every number, in order

    The book is one endless sequence: all the numbers of length 1, then all those of length 2, 3, 4… written one after the other. Every possible string is therefore somewhere in it.

  2. 2The shuffle

    Before being written, each number goes through a format-preserving encryption function F. Neighbouring numbers no longer look alike and the sequence looks random.

  3. 3The way back

    F is reversible. To find a string, it is decrypted with F-1 and its position is computed from the size of the groups before it.

  4. 4Pages on demand

    The sequence uses the 95 printable ASCII characters and is cut into pages of 4 242 characters. Only the page you open is generated.

Read the full explanation →