What is a Beale Cipher?
A Beale cipher (more precisely a book cipher) uses
a shared text as a codebook. Each word in the text is assigned a sequential
number starting at 1. To represent a letter, the sender picks any word whose
first letter matches and writes down that word's number.
Because many words can start with the same letter, the same plaintext letter
can produce different cipher numbers each time — making frequency analysis
much harder.
Three Key Texts
🌿 A Sound of Thunder (Ray Bradbury)
Bradbury's classic time-travel short story provides a rich vocabulary of
vivid, descriptive words. The canvas renders in a cool teal / green palette.
Default word: TIME MACHINE.
Read text & view key index →
🔥 We Didn't Start the Fire (Billy Joel)
Billy Joel's rapid-fire lyric parade of historical names and events creates
a diverse, wide-ranging word list. The canvas burns in reds, oranges, and
yellows on a deep red-black background.
Default word: FIRESTARTER.
Read text & view key index →
🇺🇸 Declaration of Independence
America's founding document packs in formal, weighty vocabulary that covers
every letter of the alphabet. The canvas glows in patriotic red, white, and
blue.
Default word: INDEPENDENCE.
Read text & view key index →
Digit Pile-Up
When you click Encode, each letter's cipher number is
split into individual digit particles. These digits rain down one by one,
landing in a tight pile at the letter's home position while the original
letter fades away.
Explosion Cloud
Once every digit for every letter has arrived, the entire canvas
explodes. Every digit particle blasts outward at high
speed, filling the screen with a dense, themed number cloud. Enable
Digit echoes (Environment card) for a streaking effect.
Per-Letter Reveal
Press Assemble (or Space). Each digit steers
back toward its assigned home position within its letter's pile. Once
all digits for a given letter have returned, the original
letter materialises with a bright scale-pop burst. Letters
reveal in a cascade until the full word reappears.
🌀 Noise Flow & ⚡ Anim Speed (New in v2)
These two sliders are the heart of BC2. Open
BC1 side-by-side and
move the sliders to see how each parameter changes the feel of the animation.
-
🌀 Noise Flow (0%–100%) — controls how much
Perlin noise
guides digit particles during the explosion cloud phase.
At 0%, particles wander with pure random angle jitter
— identical to BC1.
At 100%, each particle steers toward a direction
sampled from a slowly-evolving 3-D Perlin vector field, producing
organic, flowing streams across the canvas.
Values in between blend both behaviors, letting you tune
the balance between chaos and order.
-
⚡ Anim Speed (0.25×–3×) — multiplies
the animation's effective time step (
effectiveDt = dt × animSpeedMult).
Rain rate, particle flight speed, homing speed, and the reveal cascade
all respond proportionally. At 0.25× you can study individual
particle trajectories in slow motion; at 3× the whole sequence
blurs into a rapid burst.
How to Encode
- Select a key text from the Key Text dropdown.
- Type your message in the Encode tab (A–Z, 30 chars max).
- Adjust Noise Flow and Anim Speed sliders to taste.
- Click Encode. Watch the digit rain and the pile-up on the canvas.
- After the explosion, copy the cipher numbers and share them along with the key text name.
How to Decode
- Select the same key text that was used to encode.
- Paste cipher numbers into the Decode tab (space- or comma-separated).
- Click Decode. Digit particles scatter across the canvas.
- Press Assemble and watch each letter materialise, one at a time.
Behind the Scenes
Two foundational algorithms power the animations in this app.
Curious how they work? Explore them step by step:
-
Assemble Algorithm →
— see how digit particles steer back to their home positions
and trigger the per-letter reveal cascade.
-
Recursion Tutorial →
— understand the recursive thinking behind breaking cipher numbers
into individual digit particles and processing each letter in sequence.