Xerobit

Letter to Number Converter (A1Z26)

In the A1Z26 code each letter is replaced by its place in the alphabet, so A is 1 and Z is 26 and HELLO becomes 8-5-12-12-15. Paste letters or numbers and the page works out the direction itself. It runs in your browser and nothing is uploaded.

Letters are converted to numbers. Numbers separated by spaces, commas or hyphens are converted to letters.

When checked, spaces between words are preserved instead of being stripped.

Result

How to use the letters to numbers (a1z26)

  1. Type or paste text such as HELLO or a number list such as 8-5-12-12-15 into the Input box.
  2. Leave Direction on auto-detect, or force letters to numbers or numbers to letters.
  3. Choose the Number separator for encoded output: hyphen, space or comma.
  4. Keep Keep word spaces ticked if word gaps should survive, then copy the output.

What the A1Z26 code is

A letter to number converter for A1Z26 follows a plain substitution cipher: number n replaces the nth letter of the 26 letter English alphabet. It is the simplest letter-position code and has no key, so it hides nothing from anyone who recognises numbers between 1 and 26. It is used in puzzles, geocaching and classroom exercises, not for secrecy.

Encoding: number = code point of the capital letter - 64. Decoding: letter = character with code point 64 + number. Only the 26 basic Latin letters are covered; accented letters and other alphabets have no place in the code.

Reference table

LetterNumberLetterNumberLetterNumber
A1J10S19
B2K11T20
C3L12U21
D4M13V22
E5N14W23
F6O15X24
G7P16Y25
H8Q17Z26
I9R18

Output the tool produced

Input and settingsOutput
Hello World, hyphen, keep spaces8-5-12-12-15- -23-15-18-12-4
Hello World, hyphen, spaces removed8-5-12-12-15-23-15-18-12-4
Hello World, space separator, keep spaces8 5 12 12 15 23 15 18 12 4
Hello World, comma, keep spaces8,5,12,12,15, ,23,15,18,12,4
Xerobit, comma24,5,18,15,2,9,20
8-5-12-12-15--23-15-18-12-4HELLO WORLD
3-1-20CAT

A word gap is written as an empty slot between two separators, which is why the hyphen version shows a lone space between hyphens. With a space separator the gap is three spaces.

Decoding rules and errors

  • Auto-detect decodes when the text holds only digits, spaces, commas and hyphens, and encodes everything else. A lone 1 decodes to A; force the direction if you meant digits as text.
  • Numbers must be 1 to 26. 27 and 0 both return "Numbers must be between 1 and 26." Leading zeros are accepted, so 08-05 is HE.
  • Commas, spaces and hyphens are all accepted as separators when decoding. A word break is a double separator (--), or three spaces in space mode, or a doubled comma. Single spaces alone do not mark a word break, so 8 5 12 12 15 23 15 gives HELLOWO.
  • Encoding rejects digits, punctuation and accents. hi! and café both return "Only English letters and spaces are allowed."
  • Lowercase input is converted to capitals before encoding, and decoded text is always capitals. Empty or whitespace-only input returns empty output.

Worked examples

ExampleInputResult
Encode "HELLO"Input: HELLO; Direction: encode; Number separator: -; Keep word spaces: yes8-5-12-12-15
Decode 8-5-12-12-15Input: 8-5-12-12-15; Direction: decode; Number separator: -; Keep word spaces: yesHELLO
Encode a sentenceInput: Hi there; Direction: encode; Number separator: ; Keep word spaces: yes8 9 20 8 5 18 5
Decode comma-separatedInput: 23,5,18,15,2,9,20; Direction: decode; Number separator: ,; Keep word spaces: yesWEROBIT

FAQ

What does A1Z26 mean?

A equals 1 and Z equals 26. Each letter becomes its position in the English alphabet, so CAT is 3-1-20.

How do I turn numbers into letters?

Enter numbers from 1 to 26 separated by hyphens, spaces or commas. Auto-detect decodes them, or set Direction to numbers to letters.

How are spaces between words kept?

With Keep word spaces ticked, a gap is written as an extra separator slot: 8-5-12-12-15- -23-15-18-12-4. Decoding a doubled separator brings the space back.

Why did my text return an error?

Encoding only accepts the 26 English letters and spaces. Digits, punctuation and accented characters return "Only English letters and spaces are allowed."

Why does 27 or 0 fail?

Only 1 to 26 map to letters. Any other number returns "Numbers must be between 1 and 26."

Why did a list of single-spaced numbers decode without a space between words?

A single space is only a separator. Use a double hyphen, a doubled comma or three spaces for a word break.

Can this letter to number converter handle full sentences?

Yes, as long as the text holds only English letters and spaces. Punctuation and digits must be removed first.

Is A1Z26 secure?

No. It is a fixed substitution with no key, so anyone can reverse it. Use it for puzzles and teaching, not to protect information.