UTILS.
100% in-browser
🔢

A1Z26 Letter-Number Cipher (Encoder / Decoder)

Convert letters to their alphabet positions (A=1 … Z=26) and back, with a choice of separators and optional 0-based indexing — the Gravity Falls cipher.

output

About this tool

The A1Z26 cipher is one of the simplest codes there is: each letter is replaced by its position in the alphabet, so A becomes 1, B becomes 2, and Z becomes 26. This tool encodes text into numbers and decodes numbers back into letters, entirely in your browser. It is a favourite in kids' puzzle books and became widely known through the animated series Gravity Falls, which hid A1Z26 messages in its credits.

To encode, every letter is mapped to its 1-based position and the numbers within each word are joined by a separator you choose (a hyphen by default), while spaces between words are preserved. To decode, the tool splits each group of digits on the separator, converts each number 1–26 back to a letter, and rebuilds the words. Numbers outside the 1–26 range are flagged as invalid so you always get a clean result rather than a garbled one.

You can pick a hyphen, comma, dot, or space as the separator, and switch to 0-based indexing (A=0 … Z=25) for variants that count from zero. Non-letter characters are skipped when encoding. As a quick example, HELLO encodes to 8-5-12-12-15, and the classic Gravity Falls sign-off decodes straight back to plain letters.

Frequently asked questions

What is the A1Z26 cipher?
It is a substitution where each letter is replaced by its position in the alphabet: A=1, B=2, up to Z=26. Decoding simply reverses the mapping. It is a monoalphabetic code with no key, making it easy for beginners and puzzle fans.
Which separator should I use?
Any of hyphen, comma, dot, or space. The separator joins the numbers within a word; spaces between words are always kept so the word boundaries survive. When decoding, the tool accepts the chosen separator between numbers.
What does the 0-based option do?
It shifts the numbering so A=0, B=1, up to Z=25, matching variants that index from zero. Leave it off for the standard A=1 scheme. The same setting is used for both encoding and decoding, so keep it consistent.
Why did I get an invalid-input message?
When decoding, every number must fall in the valid range (1–26 for 1-based, or 0–25 for 0-based). A number outside that range cannot map to a letter, so the tool reports invalid input instead of guessing.

More tools