Substitution cipher decode
Substitution cipher decode, classical cipher, a puzzle not a protection, computed on your device.
Runs on your device. The file is never uploaded.
Substitution cipher decode finds each ciphertext letter inside the 26 letter key and returns the plain letter standing at that position. Hand it the same key string the encoder took, not an inverted one; the default is the reversed alphabet. A key with a repeat or a gap is refused, but a valid wrong key returns meaningless letters silently.
Questions
What key does it need?
Exactly 26 letters, each used once, which is the cipher alphabet lined up against a to z in order. Anything else is refused with "key must be 26 letters, each used exactly once". The default is zyxwvutsrqponmlkjihgfedcba, the reversed alphabet, which is the same mapping the Atbash cipher tool applies.
How does the key map letters?
The key describes the encode direction: position i of the key is what the letter at position i of a to z becomes. This tool runs that backwards, finding each ciphertext letter in the key and returning the plain letter at that position. Give it the same key string you gave Substitution cipher encode, not an inverted one.
Can it solve a cipher when I do not have the key?
No. There is no solver, no frequency analysis and no hill climbing on this page. It applies the key you give it and nothing more. A wrong key produces plausible-looking nonsense with no warning, because every 26-letter permutation is a valid key as far as the tool is concerned.
Is a substitution cipher secure?
No. There are a great many possible keys, but the cipher preserves letter frequencies, word lengths and repeated patterns, so frequency analysis breaks it on any reasonable amount of text. It has been readable for centuries. It is a puzzle, not protection.
What about numbers, spaces and case?
Untouched. Only A to Z and a to z are substituted, and case is preserved through the mapping, so an uppercase ciphertext letter decodes to an uppercase plaintext letter. Digits, spacing and punctuation pass through exactly as they are, which is one of the things that makes the cipher easy to attack.
Does the text or the key get uploaded?
No. The file is read as text and mapped letter by letter in a Web Worker in this tab. Neither the ciphertext nor the key goes anywhere, nothing is kept between runs, and it all works with the network off.