Substitution Cipher Solver

Paste your ciphertext below and either edit the letter mapping manually or use Auto-suggest to try a best-fit solution. The solver provides frequency analysis, decode preview, and a basic hill-climbing optimizer that seeks a key maximizing common English word matches.

Letter mapping (cipher → plaintext)

Click a target letter to change mapping; use Reset to restore identity mapping or Frequency to seed mapping.

Decoded preview

How it works

The substitution solver supports manual mapping and two automated helpers:

  1. Frequency seed: maps the most frequent ciphertext letters to the most frequent English letters (ETAOIN SHRDLU...), a good starting point.
  2. Hill-climb refine: performs many small random swaps in the candidate key and keeps swaps that increase a simple score (number of recognized common words) — this heuristic often converges to readable plaintext for medium/long ciphertexts.

Limitations

Short ciphertext or non-standard language reduces success rate. This tool is intended for learning and quick solving — for hardened cryptanalysis you may want statistical models and larger corpora.