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.


Audit: Needs review
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Note: This page needs review to confirm formulas and sources.
No formulas provided in audit spec.
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verification pending · Last code update: 2026-01-19