ToolZoneX
Blog

Secret Code Encoder/Decoder - A1Z26 Cipher

Encode text into numbers (A=1, B=2, ... Z=26) or decode a number sequence back into text, using the classic A1Z26 substitution cipher.

Encoded Output

How to Use the Secret Code Encoder/Decoder

This tool uses a simple letter-to-number substitution cipher: A=1, B=2, C=3, and so on through Z=26, ignoring case. Switch to Encode mode to turn text into a series of numbers, or Decode mode to turn a series of numbers back into text. Since this substitution isn't self-inverse like ROT13, an explicit mode toggle picks which direction to run. In the output, each number is separated by a space, a space in your original text becomes a forward slash ("/") so word breaks aren't lost, and any other punctuation passes through unchanged as its own token.

Example

Encoding "HI" produces 8 9, since H is the 8th letter and I is the 9th. Decoding 8 9 back returns "HI". Encoding "HELLO WORLD" produces 8 5 12 12 15 / 23 15 18 12 4, with the slash marking the space between the two words.

Common Use Cases

  • Creating a simple secret code for kids' games, scavenger hunts, or puzzle boxes.
  • Learning the basics of substitution ciphers in a classroom setting.
  • Decoding a number-based puzzle or riddle that uses this classic A1Z26 convention.

FAQs

  • Why does this need separate Encode and Decode modes, unlike ROT13? ROT13 is self-inverse — applying it twice returns the original text, so one box can handle both directions. This number cipher isn't self-inverse: turning "HI" into "8 9" and then treating "8 9" as more letters to encode would produce nonsense, so an explicit mode toggle is required to pick the correct direction.
  • What happens to spaces and punctuation? A space in your original text becomes a forward slash ("/") in the encoded output so word boundaries aren't lost, and any other character (punctuation, digits) passes through unchanged as its own token in the sequence.
  • Is this cipher secure? No — like ROT13, this is a simple, well-known substitution meant for casual fun and puzzles, not real security. Anyone familiar with the A=1, B=2 convention can decode it instantly.