CTF crypto tools
Nothing leaves your browserPaste a challenge string. The chain decoder peels off Base64, hex, ROT13, XOR and more, layer by layer, until the flag shows up. Plus XOR key finding and classical ciphers with automatic cracking.
Peel manually
These layers fit the current result. Click one to add it to the chain.
Paste something on the left. Recognized layers: Base64, Base32, Base58, Ascii85, hex, binary, octal, decimal, URL, HTML entities, escapes, Morse, gzip, zlib, ROT13, ROT47, Atbash, Caesar, reversed text and XOR.
- Result as text
- Result as hex
- Result as Base64
Find the key
Crack it
Tries every key and ranks the results by how English they look.
Letter frequency
Which layer is it?
CTF challenges love to wrap the flag several times. Each layer has a look you can learn. Here is flag{hi} in each of them, calculated with the same code as the decoder above.
| Layer | How to spot it | Example |
|---|---|---|
| Base64 | A–Z, a–z, 0–9, + and /, often = at the end | ZmxhZ3toaX0= |
| Base32 | Only A–Z and 2–7, padded with = to multiples of 8 | MZWGCZ33NBUX2=== |
| Base58 | Letters and digits without 0, O, I and l | J8dppbLkkY4 |
| Ascii85 | Printable punctuation soup, sometimes inside <~ ~> | <~Ao(mgHY@,A~> |
| Hex | Pairs of 0–9 and a–f, maybe with 0x or \x | 666c61677b68697d |
| Binary | Groups of eight 0s and 1s | 01100110 01101100 |
| Octal codes | Groups of three digits 0–7 | 146 154 141 147 173 150 151 175 |
| Decimal codes | Numbers from 0 to 255 | 102 108 97 103 123 104 105 125 |
| URL decode | %XX sequences like %7B | %7B%68%69%7D |
| HTML entities | f or f or & | flag |
| Escape sequences | \x66, \u0066 or \146 | \x66\x6c\x61\x67 |
| Morse code | Dots and dashes | ..-. .-.. .- --. |
| ROT13 | Letters moved 13 places | synt{uv} |
| ROT47 | All printable characters moved 47 places | 7=28L9:N |
| Atbash | Alphabet reversed, A↔Z | uozt{sr} |
| Reverse | Text written backwards, e.g. == at the start | }ih{galf |
How the chain decoder decides
Formats with a clear signature, like hex, binary, URL encoding or Base64 with padding, are always tried. Ciphers without a signature, like ROT13, Atbash, Caesar or reversed text, only count when the result gets better: when a flag appears, when the text reads clearly more like English, or when it suddenly fits a format again. That is how Base64 → ROT13 → hex is found even though ROT13 alone never looks like progress.
The search goes up to twelve layers deep. A flag beats readable text, and between two answers the shorter chain wins. If the result is still unreadable bytes, try the XOR tab, or check whether the decoder found a file signature such as gzip, PNG or ZIP.
Getting the XOR key back
XOR with the same key twice gives back the original: (m ⊕ k) ⊕ k = m. And if you know a part of the plaintext, c ⊕ m = k gives you the key. Since most flags start with something like flag{, the first five bytes of the ciphertext give away up to five bytes of the key.
Example: 0d5f180c48015b4104 is flag{x0r} XORed with k3y. Paste it into the XOR tab and click “Get key” with the known plaintext flag{. The tool notices that the leaked bytes repeat every three characters and decrypts the rest.
Tell them apart
The index of coincidence is close to 0.066, like English. Then it is a single substitution (Caesar, Atbash, Affine) or a transposition (Rail fence). If the most common letters are E, T and A, letters only changed places: try Rail fence.
An index near 0.04 means several alphabets, usually Vigenère or Beaufort. The cracker estimates the key length from the columns and solves each column like a Caesar shift.
Typical for Playfair: it encrypts pairs of letters in a 5 × 5 square. You need the keyword, or a lot of patience.
Example: aol mshn pz ulhy is Caesar with shift 7, and TLSDHFAIHDEEGIN is Rail fence with three rails.
Questions about the CTF tools
What is a chain decoder?
A tool that peels off several layers of encoding in a row, for example Base64, then ROT13, then hex, then XOR. It tries the formats that fit, keeps the steps that make the text more readable and stops at a flag or at plain text. Every step is shown, so you can follow and copy each layer.
Which encodings and ciphers does it detect?
Base64 (also URL-safe), Base32, Base58, Ascii85, hex (also with 0x, \x or colons), binary, octal and decimal codes, URL encoding, HTML entities, escape sequences, Morse code, gzip and zlib, ROT13, ROT47, Atbash, Caesar, reversed text, single-byte XOR and XOR with a short key that the flag format gives away.
How do I find an XOR key?
If one byte is the key, try all 255 and keep the readable result. If the key is longer and you know how the plaintext starts, XOR the ciphertext with that start, for example “flag{”. The bytes you get are the key. Without a known start, the key length can be estimated from bit differences between blocks, then each position is solved like a one-byte key.
Can it decode a hash like MD5?
No. A hash is a one-way fingerprint, not an encoding, so there is nothing to peel off. The chain stops there. To find out what kind of string you have, use the identifier.
Is my input sent anywhere?
No. Everything runs in your browser. Nothing you paste is sent to a server or stored, so you can use it during a competition without leaking your challenge data.