Xerobit

Cipher Decoder: Identify and Decode Unknown Ciphertext

Paste any ciphertext into this cipher decoder to automatically test it against common encoding methods. It acts as a cipher identifier and cipher solver by trying Caesar shifts, Base64, hex, binary, Morse, ROT13, Atbash, reversed text, and A1Z26 number substitution. Results are ranked by how closely their letter frequencies match standard English using a chi-squared statistic. Everything runs locally in your browser.

Supports letters, numbers, dots, dashes, slashes, spaces, and Base64 characters.

Decoded Results

Caesar shift 3: Hello World
MethodResultScore
Caesar shift 3Hello World4.26
Caesar shift 6Ebiil Tloia24.01
Caesar shift 14Wtaad Ldgas24.79
AtbashPslli Aiflt31.68
Caesar shift 25Lipps Asvph59.99
Caesar shift 12Yvccf Nficu62.14
Caesar shift 22Olssv Dvysk69.31
Caesar shift 10Axeeh Phkew93.92

The text above is the lowest-scoring candidate. Scores combine a chi-squared test against English letter frequencies with a bonus for common English words: lower is a better match. Short texts can still rank wrongly, so read the table. Keyed ciphers like Vigenere or Playfair cannot be solved automatically here.

How to use the cipher decoder

  1. Paste your unknown ciphertext into the text area.
  2. The cipher decoder instantly tests the input against multiple methods including Caesar shifts, Base64, hex, binary, Morse, and more.
  3. Review the table of results, sorted by the chi-squared score (lower scores indicate a closer match to natural English).
  4. If no result looks correct, the text may use a keyed cipher that requires additional information.

How the cipher identifier ranks results

When you paste text into this cipher decoder, it generates candidate plaintexts from every supported method. For Caesar shifts, it produces all 25 possible rotations. For encodings like Base64, hex, and binary, it attempts to parse the string and decodes it if the format is valid.

Each candidate is scored using a chi-squared test against expected English letter frequencies. The formula for each letter is (Observed - Expected)2 / Expected, summed across all 26 letters. For example, if a decoded text has 10% 'E' but English expects 12.7%, that difference contributes to the total score. A lower chi-squared value means the letter distribution is closer to normal English, making it a more likely solution. Because very short messages give noisy letter counts, the score is also reduced when the decoded words are common English words such as "the" or "hello".

Supported decoding methods

This tool acts as a general-purpose cipher solver by testing several categories of encoding and simple substitution:

  • Caesar shifts (1 through 25): Each row undoes a shift of that size, so "Caesar shift 3" means the text was encoded by moving letters 3 places forward. ROT13 (shift 13) is listed under its own name. Use a dedicated caesar cipher translator if you already know the exact shift.
  • Atbash: Reverses the alphabet so A becomes Z, B becomes Y, and so on.
  • Reversed text: Flips the entire string backwards.
  • Base64: Decodes standard Base64 strings if the character set and padding are valid.
  • Hexadecimal: Converts pairs of hex digits (like 48656c6c6f) into ASCII text.
  • Binary: Converts groups of 8 bits separated by spaces into text.
  • A1Z26: Treats numbers separated by hyphens, commas, or spaces as alphabet positions (1=A, 26=Z). See the a1z26 cipher tool for dedicated encoding.
  • Morse code: Translates dots, dashes, and slashes into letters if the input contains only those characters.

Expected English letter frequencies

The chi-squared part of the scoring relies on standard English letter frequencies. Here are the approximate percentages used by the cipher decoder to evaluate each candidate:

LetterFrequency (%)LetterFrequency (%)
E12.70N6.75
T9.06O7.51
A8.17S6.33
I6.97H6.09
R5.99L4.03
D4.25C2.78
U2.76M2.41
W2.36F2.23
G2.02Y1.97
P1.93B1.49
V0.98K0.77
X0.15J0.15
Q0.10Z0.07

If your ciphertext is not English, the chi-squared scores will not reliably identify the correct plaintext.

Limitations with keyed ciphers

This cipher decoder handles single-key substitutions and standard encodings. It cannot automatically solve polyalphabetic or transposition ciphers that require a secret key or specific parameters. For example, a vigenere cipher uses a repeating keyword to shift letters differently throughout the message. Without knowing the keyword or its length, automated frequency analysis alone is usually insufficient.

Similarly, tools like the playfair cipher, rail fence cipher, affine cipher, and bacon cipher rely on grids, zigzag patterns, mathematical keys, or binary groupings that this identifier does not attempt to brute-force. If none of the top results look like readable text, consider whether the sender used one of these keyed methods.

Practical tips to decode cipher text

When trying to decode cipher messages manually alongside this tool, look for structural clues. Short words of one to three letters often represent "a", "I", "the", "and", or "is". Repeated letter patterns (like double letters) can narrow down possibilities quickly. Punctuation and word boundaries are preserved in simple substitution ciphers, which makes them easier to crack than formats like Base64 or hex where spacing is removed.

If the input consists entirely of dots and dashes, it is almost certainly Morse code. If it contains only 0s and 1s grouped in eights, try binary. Strings ending with one or two equals signs (=) and containing uppercase, lowercase, digits, plus, and slash characters are strong indicators of Base64. Recognizing these patterns helps you understand why the cipher solver ranks certain methods higher than others.

Worked examples

ExampleInputResult
Caesar shiftCiphertext: Khoor ZruogCaesar shift 3: Hello World
Base64 stringCiphertext: SGVsbG8gV29ybGQ=Base64: Hello World
Morse codeCiphertext: ... --- ...Morse: SOS
Hex encodedCiphertext: 48656c6c6fHex: Hello

FAQ

What is a cipher decoder?

A cipher decoder is a tool that attempts to convert encrypted or encoded text back into readable plaintext. This version works as an automatic cipher identifier by testing multiple common methods simultaneously and ranking the outputs.

Can this tool act as a cipher solver for any encryption?

No. It solves simple substitution ciphers like Caesar and Atbash, and decodes standard formats like Base64, hex, binary, and Morse. Keyed ciphers such as Vigenere or Playfair require a secret key and cannot be solved automatically here.

How does the cipher identifier know which result is best?

It calculates a chi-squared statistic comparing the letter frequencies of each decoded candidate against standard English. The candidates with the lowest scores appear at the top of the table because they most closely resemble natural language.

Why did my ciphertext return no readable results?

The text might use a keyed cipher, a non-English language, or a custom encoding scheme not covered by the standard methods. It could also be random noise rather than actual encoded data.

Is my data safe when I decode cipher text here?

Yes. The cipher decoder runs entirely in your browser using JavaScript. No text is sent to any server, making it safe for sensitive or private ciphertext.

Does it support other encodings like Base32?

This tool focuses on the most common quick-check formats. For dedicated Base32 decoding, use a specific base32 decoder tool instead.