Tupper’s self-referential formula is a mathematical expression that can encode any bitmap image as a single number k. When plotted, it reproduces the original image, demonstrating a curious property where the formula can literally graph itself. This tool lets you draw patterns or convert text into k values and visualize them.

1️⃣ Input Mode

Draw on the canvas below (106×17 grid). Click "Generate k" to see the k value encoding your pattern.

k value from drawing:


2️⃣ Plot any k value

Paste a k value from above to visualize the pattern.

Tupper’s Formula:

$$\frac{1}{2} < \left\lfloor \mod\left(\left\lfloor \frac{y}{17} \right\rfloor 2^{-17 \lfloor x \rfloor - \text{mod}(\lfloor y \rfloor,17)}, 2\right) \right\rfloor$$

All patterns are plotted using Tupper’s self-referential formula. Learn more on Wikipedia.