How To Decode Encoded Text

By Neo |

How To Decode Encoded Text starts with identifying the encoding scheme — because the same string of characters can mean entirely different things depending on whether it was encoded as Base64, hexadecimal, URL percent-encoding, Morse code, or something else entirely. Once you know the scheme, decoding is mechanical. This guide walks through every common encoding type, shows you how to spot each one in the wild, and gives you the exact steps to reverse it — plus a quick-reference cheat sheet and links to free online tools.

Why Text Gets Encoded in the First Place

Encoding exists for several distinct reasons, and knowing the reason often points you to the scheme:

  • Data transmission safety. Protocols like email (SMTP) were designed for plain ASCII text, not binary data. Base64 converts arbitrary binary — images, files, cryptographic keys — into a safe ASCII alphabet so it survives transport without corruption.
  • URL safety. URLs may only contain a restricted set of characters. Percent-encoding (also called URL encoding) replaces unsafe characters such as spaces, ampersands, and non-ASCII bytes with a %XX sequence, where XX is the hexadecimal ASCII value of the character.
  • Compact transmission. GSM 7-bit encoding packs text messages into fewer bits than standard 8-bit ASCII, squeezing more characters into a single SMS frame.
  • Light obfuscation. ROT13 is used on forums and in puzzle communities to hide spoilers. It does not provide any real security — it just shifts letters far enough that the text is not accidentally readable at a glance.
  • Cryptography and ciphers. Caesar ciphers, Atbash, and other classical substitution ciphers encode text to conceal meaning, requiring knowledge of the key or shift to reverse.

How to Identify the Encoding Type

Before you can decode anything, you need to identify what you are looking at. Each encoding has telltale signs in its character set, structure, and length.

Base64

Base64 uses the characters A–Z, a–z, 0–9, +, and /. The encoded string often ends with one or two = signs (padding), and its total length is always a multiple of 4. The URL-safe variant substitutes - for + and _ for /. Example: SGVsbG8= decodes to Hello.

Hexadecimal (Hex)

Hex-encoded text uses only the digits 0–9 and letters A–F (or a–f). Characters are always encoded as pairs — a single byte is always two hex digits — so you will often see groupings like 48 65 6C 6C 6F (which is "Hello"). An odd total number of hex digits, or characters outside the 0–F range, means it is not standard hex.

URL Encoding (Percent-Encoding)

URL-encoded strings contain %XX sequences where XX is always a two-digit hexadecimal value. Spaces appear as either %20 or +. If you see a string with lots of percent signs followed by two hex digits, it is almost certainly URL-encoded.

Morse Code

Morse code uses only three symbols: dots (.), dashes (-), and spaces. Individual characters are separated by single spaces; words are separated by a forward slash (/) or a triple space. Example: .... . .-.. .-.. --- decodes to HELLO.

A1Z26

A1Z26 encodes each letter as its position in the alphabet: A=1, B=2 … Z=26. The numbers fall between 1 and 26, separated by spaces or dashes. If all values are in that range, A1Z26 is the first thing to try. Use our Letter Number Converter to decode A1Z26 instantly.

ROT13

ROT13 shifts every letter 13 positions forward in the alphabet (A→N, B→O, and so on). The result looks like English-ish text — same word lengths, same proportion of vowels and consonants — but the words are not real English words. Numbers and punctuation are left unchanged.

Binary

Binary-encoded text contains only 0s and 1s, typically grouped into 8-bit bytes separated by spaces: 01001000 01100101. If the total bit count is a multiple of 8 and only 0s and 1s are present, it is binary-encoded ASCII.

Caesar Cipher

A Caesar cipher shifts the entire alphabet by a fixed number of positions. The result looks like readable text — word lengths are intact, common short words appear — but the actual words are gibberish. Because there are only 25 possible shifts, brute-forcing all of them is straightforward.

Step-by-Step Decoding Guides

Decoding Base64

  1. If the string uses URL-safe characters, replace - with + and _ with /.
  2. Check the length. If it is not a multiple of 4, append = signs until it is.
  3. Run the result through atob() in a browser console, or paste it into our Base64 Encoder / Decoder.

Decoding Hex

  1. Split the string into two-character pairs (e.g. 48 65 6C).
  2. Convert each pair from base-16 to a decimal number: 48 (hex) = 72 (decimal).
  3. Map each decimal value to its ASCII character: 72 = H, 101 = e, and so on. Use our ASCII Decoder to do this automatically.

Decoding URL Encoding

  1. Replace every + with a space character.
  2. Find each %XX sequence in the string.
  3. Convert the two hex digits XX to a decimal value and look up the corresponding ASCII character. %20 → 32 → space; %41 → 65 → A.
  4. In JavaScript, decodeURIComponent() handles the entire process automatically.

Decoding Morse Code

  1. Split the string on single spaces to get individual character codes.
  2. Split on / or triple spaces to find word boundaries.
  3. Look up each dot-dash sequence in a Morse code reference chart. Use our Morse Code Translator to decode entire messages at once.

Decoding A1Z26

  1. Split the encoded string on its delimiter (space, dash, or comma).
  2. Map each number to its letter: 1→A, 2→B, 3→C … 26→Z.
  3. Numbers outside the 1–26 range indicate a different encoding — check for ASCII or a shifted variant.

Decoding ROT13

  1. For each letter, shift it 13 positions forward in the alphabet, wrapping around after Z.
  2. A→N, B→O, C→P … M→Z, N→A, O→B … Z→M.
  3. Applying ROT13 twice returns the original text — the encode and decode operation are identical.
  4. Numbers, spaces, and punctuation are left unchanged.

Decoding Binary

  1. Split the bit string into 8-bit groups (bytes): 01001000, 01100101, etc.
  2. Convert each 8-bit byte from binary to decimal: 01001000 = 72.
  3. Map each decimal value to its ASCII character: 72 = H. Our ASCII Decoder accepts decimal values directly.

Quick Identification Cheat Sheet

When you encounter an unknown encoded string, run through this table top to bottom until a row matches what you see.

Encoding TypeKey IdentifiersExampleDecoding Method
Base64A–Z, a–z, 0–9, +, /; ends with = or ==; length is a multiple of 4SGVsbG8=Pad to multiple of 4, then decode with atob() or Base64 tool
HexOnly 0–9 and A–F (or a–f); characters appear in pairs48 65 6C 6C 6FSplit into pairs, convert each pair from hex to decimal, map to ASCII
URL EncodingContains %XX sequences; spaces shown as %20 or +Hello%20WorldReplace + with space, convert each %XX from hex to character
Morse CodeOnly dots (.), dashes (-), and spaces; words split by / or triple space.... . .-.. .-.. ---Split on spaces for characters, / or triple space for words; look up each symbol
A1Z26Numbers between 1 and 26, separated by spaces or dashes8-5-12-12-15Map 1→A, 2→B … 26→Z
ROT13Looks like English text but words are unrecognisable; only letters are shiftedUryybShift each letter 13 positions; applying ROT13 twice returns the original
BinaryOnly 0s and 1s, typically in groups of 8 bits01001000 01100101Group into 8-bit bytes, convert each from binary to decimal, map to ASCII
Caesar CipherLooks like almost-English text with consistently shifted lettersKhoor (shift 3)Try shifts 1–25; the one that produces readable text is the key

Free Online Tools to Decode Encoded Text

Manual decoding is a useful skill, but for anything longer than a few characters, an online tool is far faster and less error-prone. Here are the relevant tools on this site:

  • Base64 Encoder / Decoder — paste any Base64 string to get the decoded output instantly. Also handles the URL-safe variant.
  • ASCII Decoder — converts ASCII decimal codes (and hex codes) back to readable text. Useful for both Hex and Binary decoding once you have the decimal values.
  • Letter Number Converter — the main A1Z26 tool on the site. Handles letters-to-numbers and numbers-to-letters in both directions.
  • Morse Code Translator — decodes dot-dash sequences to text and encodes text to Morse. Handles word separators automatically.
  • Letters to Numbers Converter (Home) — the full converter supporting multiple encoding modes, including A1Z26, ASCII, and more.

Frequently Asked Questions

How do I know what encoding scheme was used?

Look at the character set. Base64 uses A-Z, a-z, 0-9, +, and / with optional = padding. Hex uses only 0-9 and A-F in pairs. URL encoding contains %XX sequences. Morse code uses only dots, dashes, and spaces. A1Z26 uses numbers 1–26. Binary uses only 0s and 1s in groups of 8.

What is the difference between encoding and encryption?

Encoding transforms data into a different format for compatibility or transmission purposes — it does not require a secret key and can always be reversed. Encryption scrambles data using a key so that only authorised parties can read it. Base64, Hex, and URL encoding are not encryption; ROT13 and Caesar cipher are very weak ciphers sometimes used for light obfuscation.

How do I decode Base64 text?

Replace any URL-safe characters (- with +, _ with /), add = padding until the length is a multiple of 4, then pass the string to a Base64 decoder such as atob() in a browser console or an online tool like the one at letters2numbersconverter.com/tools/base64-encoder-decoder.

Is ROT13 a form of encryption?

ROT13 is technically a Caesar cipher with a fixed shift of 13. It is not considered secure encryption — it provides only light obfuscation and is trivially reversible. Because the alphabet has 26 letters, applying ROT13 twice returns the original text.

What does percent-encoding (%20) mean in a URL?

%20 is the URL percent-encoded representation of a space character. In URL encoding, any character that is not safe for a URL is replaced by a % sign followed by its two-digit hexadecimal ASCII value. For example, %41 decodes to the letter A (ASCII decimal 65, hex 41).

Ready to decode? Pick the right tool for your encoding scheme: