Cryptography

The Cryptography Playground

Encode, decode, and explore the ancient art of secret writing.

The Caesar cipher, used by Julius Caesar to protect military messages, shifts each letter by a fixed number of positions in the alphabet. With only 25 possible shifts, it is trivially breakable today, but it introduced the fundamental concept of substitution ciphers that would dominate cryptography for centuries.
The Vigenere cipher, once called "le chiffre indechiffrable," uses a keyword to apply different Caesar shifts to each letter. Invented in the 16th century, it resisted cryptanalysis for 300 years until Friedrich Kasiski and Charles Babbage independently broke it by exploiting repeating key patterns.
ROT13 is a special case of the Caesar cipher with a shift of 13. Because the Latin alphabet has 26 letters, applying ROT13 twice returns the original text, making it its own inverse. It is used on the internet not for security, but to hide spoilers and puzzle answers from casual reading.
Atbash is one of the oldest known ciphers, originating from Hebrew scribes. It substitutes each letter with its reverse in the alphabet: A becomes Z, B becomes Y, and so on. Like ROT13, it is its own inverse. The name comes from the Hebrew letters Aleph-Tav-Beth-Shin, illustrating the substitution pattern.
The Rail Fence cipher is a transposition cipher that writes the message in a zigzag pattern across a number of "rails" (rows), then reads off each row to produce the ciphertext. Unlike substitution ciphers, it does not change the letters themselves, only their positions. It was used during the American Civil War.
Morse code is not a cipher but an encoding system, translating letters to sequences of dots and dashes for telegraph transmission. Developed by Samuel Morse in the 1830s, it remained in active use for over 160 years. The pattern of letter frequencies in English influenced the design, with the most common letter E represented by a single dot.
Base64 is a binary-to-text encoding that represents binary data using 64 ASCII characters. It is not encryption; it provides no security. It is widely used in email attachments, data URLs, and API payloads to safely transmit binary data through text-only channels. Each Base64 character represents exactly 6 bits of data.

Shift

3

Key

No configuration needed

ROT13 uses a fixed shift of 13. Apply it twice to get back the original.

No configuration needed

Atbash reverses the alphabet. A↔Z, B↔Y, C↔X, and so on.

Rails

3

Morse Code

Letters are separated by spaces, words by " / ".

Base64 Encoding

Standard Base64 encoding (RFC 4648).

Direction:

Frequency Analysis

Letter distribution in output (compare with expected English: E 12.7%, T 9.1%, A 8.2%, O 7.5%, I 7.0%...)

Try to Crack It

A ciphertext will be generated using a random cipher and key. Analyze the text, use frequency analysis, and try to determine the cipher and key used.

Frequency Analysis of Ciphertext