StegoToolkit

ROT13 & Caesar Cipher Solver, Encoder and Decoder

Decode, encode and solve ROT13, ROT47 and Caesar ciphers: tries every shift, ranks the likely plaintext with an honest confidence, finds the shift from a rotated flag prefix (synt{ → flag{), and decodes only the part you choose. Encode too.

All 26 shifts
Flag-prefix finder
Encode + Decode
ROT13 & Caesar Cipher Solver, Encoder and Decoder
Try an example:

🔒 Your text is processed locally in your browser and is not sent to our servers.

How to solve a ROT or Caesar cipher (4 steps)

  1. Paste the ciphertext: Paste up to 64 KB of text, or arrive with a value already loaded from the Strings Analyzer, Hex Viewer, EXIF Viewer or Encoding Auto-Decoder. Choose Solve when you do not know the key, Decode when you do, or Encode to build a challenge.
  2. Read the prefix finder and the ranking: If the text contains a rotated flag prefix such as synt{, the shift is shown first. Below it, all 26 shifts are ranked with a plain-language Solver confidence — High, Medium, Low or Unreliable — and the tool refuses to pick a winner from fewer than 8 letters.
  3. Narrow it down: Use a crib (a word you expect, like flag) to keep only the shifts that produce it, or change the scope to rotate only the text inside braces, a selection, or each line on its own.
  4. Use the result: Copy the result or the flag, swap input and output to check a round trip, export JSON or CSV, or send the result to the next tool. Open the Learn tab for the step-by-step formula, the cipher wheel, the frequency chart and the Index of Coincidence clue.

What This Tool Does: Solve, Decode and Encode

Decode, encode and brute-force Caesar ciphers, ROT13, ROT5, ROT18, ROT47 and progressive shifts in one place. Solve tries every shift and ranks the likely plaintext. Decode applies a shift or variant you already know. Encode rotates plain text forward, so you can build a test cipher or check a round trip.

It also reads rotated CTF flag prefixes: if the text contains something like synt{, the shift that turns it into flag{ is shown first. You can rotate the whole text, only the part inside the outermost braces, a selection, or each line on its own (up to 500 lines), which suits log files and puzzles where only part of the text is enciphered. Input is limited to 64 KB.

Candidates are scored with English letter statistics by default, and German, French, Spanish, Italian, Portuguese or Russian when you choose one. The tool reports a confidence level, not a percentage, and with fewer than 8 letters it never names a winner. Results can be copied, exported as JSON or CSV, or sent to the next tool. Everything runs in your browser.

ROT13 vs ROT5 vs ROT18 vs ROT47

What each variant rotates, whether applying it twice undoes it, and a real example.

VariantRotatesSelf-inverse?Example
Caesar +3A–Z, any shift 0–25Nohello world → khoor zruog
ROT13A–Z, shift 13Yesflag{rot13_is_easy} ↔ synt{ebg13_vf_rnfl}
ROT5Digits 0–9, shift 5Yes12345 ↔ 67890
ROT18ROT13 letters + ROT5 digitsYesHello123 ↔ Uryyb678
ROT47Printable ASCII ! to ~, shift 47Yeshello ↔ 96==@
Progressive (start 1, step +1)A–Z, key = start + n × stepNoattack → bvwehq
Custom alphabetAny ordered alphabet you supplyNoRussian, Greek, A–Z + digits …
Custom ASCII rangeAny range inside 0x20–0x7EOnly for an exact half-turn0x21–0x7E with shift 47 is ROT47

How to Solve a Caesar Cipher Without the Key

A Caesar cipher replaces every letter with the letter a fixed number of places further along the alphabet, so there are only 25 useful keys. Brute force simply tries them all: this tool decrypts the text with every shift from 0 to 25 and scores each result by how much it looks like the language you picked — how close its letter frequencies are to normal English, how many of its letter pairs are common ones such as th and er, and how much of it is made of common words. The highest score is the likely plaintext.

That works well for sentences and fails for tiny inputs, which is why the tool reports a Solver confidence instead of a percentage. With 20 or more letters and a clear gap over the runner-up it says High. With 8 to 19 letters the best it will say is Low, because a handful of letters can look like English by chance. Under 8 letters it says Unreliable and does not highlight a winner at all.

ROT13, ROT5, ROT18 and ROT47: What Each One Rotates

ROT13 is a Caesar shift of 13. Because the alphabet has 26 letters, applying it twice returns the original, so decoding and encoding are the same operation. ROT5 does the same for the ten digits, ROT18 combines ROT13 for letters with ROT5 for digits, and ROT47 rotates the 94 printable ASCII characters from ! to ~ by 47 places, which is why it also scrambles punctuation and digits.

Pick the variant from what the challenge text contains. A flag with digits that came out as ROT13 will still show its digits unchanged, and the tool says so in the result notes so you can switch to ROT18 or ROT47 instead of wondering why part of the text looks wrong.

How CTF Flag Prefixes Reveal ROT13

Frequency analysis needs text, but a flag is often shorter than twenty letters. What a flag does have is a known beginning: flag{, ctf{, htb{, picoctf{. If the ciphertext starts synt{, then s→f, y→l, n→a and t→g are all the same distance apart — 13 places — and four letters agreeing on one shift is strong evidence even though four letters could never be ranked statistically.

The prefix finder looks for any run of letters directly before a brace, compares it with every known prefix of the same length, and proposes a shift only when every letter agrees. It also finds the token inside longer text, and you can add your own prefixes (for example thm) so it works for any event's flag format. The result appears above the ranked candidates, with the decoded flag so you can confirm it before using it.

When Caesar Brute Force Fails

If none of the 26 results reads as language, the text is probably not a single-shift cipher. Short text, text with only the content of the braces rotated, and text in another language all look the same to a frequency table. When there is enough text the tool says so plainly and shows what to try next: an Index of Coincidence well below the language's normal value is a clue for a polyalphabetic cipher such as Vigenère, an alphabet-reversing Atbash output that reads as text points to Atbash, and mostly non-letter characters suggest ROT47 or an XOR-style cipher. Each suggestion shows the numbers behind it and is only a hint, never a verdict.

What the Solver Supports

FeatureWhat it doesWhere it applies
SolveTries every shift and ranks the results by letter frequency, common letter pairs and common wordsCaesar, custom alphabet, custom ASCII range, progressive (all start/step pairs)
DecodeApplies a key you already know by subtracting itEvery variant
EncodeApplies the key forward and tells the recipient how to decryptEvery variant
ScopeWhole text, inside the outermost { }, the selected range, or each line independentlyEvery mode
LanguagesEnglish by default; German, French, Spanish, Italian and Portuguese score Latin text, Russian scores the Russian alphabetSolve

Decoding Part of a String: Braces, Selection and Lines

Challenge authors often rotate only what is inside the braces and leave the prefix alone, so rotating the whole text turns flag{ into garbage. Choose Inside { } to rotate only the contents of the outermost balanced pair of braces; nested or extra groups are reported, not silently changed. Selection rotates only the range you highlighted in the box, and Per line treats every line as its own puzzle with its own best shift and its own confidence, which is the right choice when each line was encrypted separately. Per-line mode handles the first 500 lines.

Progressive Caesar, Custom Alphabets and Other Languages

A progressive Caesar cipher changes the shift with every letter: the key for the nth letter (counting from 0, letters only) is start + n × step, so attack with start 1 and step +1 becomes bvwehq. With a known start and step, Decode and Encode apply it directly; in Solve mode the tool tries all 676 start/step combinations over the first 4,096 characters and ranks them.

A custom alphabet lets you rotate any ordered list of symbols — the Russian or Greek alphabet, letters plus digits, a CTF-specific symbol set. Symbols must be unique, characters outside the alphabet pass through unchanged, and case is matched loosely when every symbol has a distinct lower-case form. German, French, Spanish, Italian and Portuguese data is loaded only when you choose that language, so the English page stays light.

Examples

Input: synt{uryyb_jbeyq}

Result: flag{hello_world}

Meaning: The prefix synt{ sits 13 places from flag{ for every letter, so ROT13 is identified from just four letters — frequency analysis could not rank this 14-letter string reliably.

Input: khoor zruog (Caesar, shift 3)

Result: hello world

Meaning: Encrypted with +3, decrypted with −3 (the same as +23). Case, spaces and punctuation are untouched.

Input: mshn{jhlzhy_zopma_7}

Result: flag{caesar_shift_7}

Meaning: The prefix finder proposes shift 7; the digit 7 is not a letter, so it is left alone.

Input: oai{op} (default prefix htb)

Result: htb{hi}

Meaning: Shift 7 again, this time against the htb{ prefix — the finder tries every default prefix of the same length.

Input: Hello123 (ROT18)

Result: Uryyb678

Meaning: ROT18 is ROT13 on letters plus ROT5 on digits, so 123 becomes 678.

Input: hello (ROT47)

Result: 96==@

Meaning: ROT47 rotates all printable ASCII; applying it to 96==@ returns hello.

Input: flag{vafvqr_oenprf} (scope: inside braces, ROT13)

Result: flag{inside_braces}

Meaning: Only the content of the braces is rotated; the prefix is left exactly as it was.

Input: rjjy fy ifbs / karwp cqn vjy (scope: per line)

Result: meet at dawn / bring the map

Meaning: Each line gets its own shift — 5 and 9 — and its own Low confidence, because ten or eleven letters is short.

Input: attack (progressive, start 1, step +1)

Result: bvwehq

Meaning: The keys for the six letters are 1, 2, 3, 4, 5, 6: a→b, t→v, t→w, a→e, c→h, k→q.

Input: pbng

Result: No winner (Unreliable)

Meaning: Four letters cannot be ranked. Every shift is listed; a crib such as coat would find shift 13 immediately.

How it works

1. Rotation

Each letter's position in the alphabet has the key added (encode) or subtracted (decode) modulo the alphabet length. Case is kept, and anything outside the alphabet passes through.

2. Prefix scan

Tokens of letters directly before a { are compared with each known flag prefix of the same length; one consistent shift across all letters proposes that shift.

3. Scoring

Every shift is scored from letter-frequency fit (chi-squared), common letter pairs and common words, plus a bonus for flag patterns and your crib. The score is internal, 0–100, and never a percentage.

4. Confidence

The gap between first and second place is capped by how much text there is: under 8 letters Unreliable, 8–19 at most Low, 20 or more High when the gap is clear and Medium when it is small.

5. Presentation

A flag found under any shift promotes that candidate. If nothing looks readable the tool says so and lists the next tools to try with the evidence behind each suggestion.

What the results mean

ResultWhat it meansWhat to do
Solver confidence: High20 or more letters and a clear gap over the runner-upThe starred shift is very likely right; check the text reads correctly
Solver confidence: MediumEnough text, but the top two are closeCompare the two highlighted candidates; use a crib to decide
Solver confidence: Low8 to 19 letters — short textVerify manually; the flag-prefix finder or a crib is more reliable
Solver confidence: UnreliableUnder 8 letters, or no scoring data for the alphabetNo winner is shown; use the crib box or add more ciphertext
🚩 detected from flag prefixEvery letter of a rotated prefix agrees on one shiftPress Use this to see the full decoded text
No shift produces text that looks readableNone of the shifts reads as the chosen languageIt may not be a single-shift cipher — follow the evidence-based suggestions
This already looks like readable textShift 0 ranked firstThe input may not be encrypted with a Caesar shift
Contains a hexadecimal stringThe result holds 32 or more hex digitsIt may be encoded data or a hash — send it to the Encoding Auto-Decoder

Limitations

  • Text input only — there is no file upload. To work from a file, use the Strings Analyzer or the Hex Viewer and hand the strings over.
  • Not a Vigenère, Atbash, Affine, Rail Fence, Bacon or Playfair solver. The tool only suggests those, with the evidence it has; it never claims one cipher from a single number.
  • Not an encoding decoder. Base64, hex and URL encoding belong to the Encoding Auto-Decoder; the tool notices when the input looks like one.
  • Ranking is statistical. Under 20 letters it cannot be certain and under 8 letters it will not guess; text in a language you did not choose will look like noise.
  • Letters outside the active alphabet (é, ß, Cyrillic) are left unchanged by Caesar and ROT13 — use a custom alphabet to rotate them. German, French, Spanish, Italian and Portuguese scoring uses the plain A–Z letters only.
  • Per-line mode handles the first 500 lines; progressive search analyses the first 4,096 characters; input is limited to 64 KB.
  • Scoring data is compiled for common modern text, not for every dialect or for domain jargon — a sentence of rare technical words can score lower than it deserves.

Privacy

Your ciphertext is processed locally in your browser and is not sent to our servers: the text you paste is never put in the page address and is not sent to analytics. Results live in memory for the current page only. A value handed over from another CTF Lab tool arrives through IndexedDB on your device, and a value you send onward is stored there the same way; both expire after 30 minutes. Only your display preferences (mode, variant, language, character options), any custom flag prefixes you add and which result tabs you have pinned are remembered in this browser's localStorage — your input, output, shifts and alphabets never are.

Frequently Asked Questions

How do I decode a Caesar cipher without the key?

Choose Solve mode and paste the ciphertext. The tool tries all 26 shifts (0–25), scores each against letter frequencies, common letter pairs and common words, and ranks them. With enough text the top result is clearly ahead; with short text the tool tells you the result is unreliable.

How do I decode ROT13?

Paste the text and choose ROT13 in Decode mode. ROT13 shifts letters by 13, so applying it twice returns the original — decoding and encoding are the same operation.

What is the difference between ROT13, ROT5, ROT18 and ROT47?

ROT13 rotates letters. ROT5 rotates digits. ROT18 is ROT13 letters plus ROT5 digits. ROT47 rotates all 94 printable ASCII characters, so it also changes digits and punctuation.

Why can't the tool pick a shift for my short ciphertext?

Letter-frequency statistics need enough letters. Under 8 letters there is nothing reliable to measure, so no winner is highlighted. If it is a flag, the flag-prefix finder or the crib box works on very short strings.

What is the flag-prefix finder?

CTF flags start with a known prefix such as flag{. If the ciphertext begins synt{, every letter is 13 positions from flag, which identifies ROT13 immediately.

Only part of my text is rotated — what should I do?

Use scope: “Inside { }” for wrapped flags, “Selection” for a highlighted part, or “Per line” if different lines used different shifts.

How do I know whether to decrypt with +N or −N?

The result states it: “Encrypted with shift +3. To decrypt, shift −3 (same as +23).” For ROT13 and ROT47 the direction does not matter.

What does a “Low” or “Unreliable” solver confidence mean?

It reflects how much text there is and how far ahead the best candidate is. It is a qualitative guide, not a probability. Check the candidates yourself when confidence is Low.

What is a crib and how do I use it?

A crib is a word you expect in the plaintext (for example flag). Enter it and the table shows only the shifts that produce it.

Can I encode with this tool?

Yes — switch to Encode mode, choose the shift or variant, and the tool also tells the recipient how to decrypt.

Is my text uploaded?

Your ciphertext is processed locally in your browser and is not sent to our servers. The tool does not transmit your input, keys or results.

How is this different from other Caesar and ROT tools?

Other tools also brute force and rank shifts, and this one does too. For CTF work it adds: honest confidence on short text, finding the shift from a flag prefix, rotating only part of the text, and one-click handoff to and from the other StegoToolkit tools.

What is a progressive Caesar cipher and how do I decode one?

A progressive Caesar cipher changes the shift with each letter: the nth letter (counting from 0) uses start + n × step. Choose the Progressive variant, enter the start and step and use Decode; if you do not know them, Solve searches every start and step over the first 4,096 characters and ranks the results.

Can I use my own alphabet or another language?

Yes. Choose Custom alphabet and type or pick an ordered alphabet — symbols must be unique, and characters outside it pass through unchanged. German, French, Spanish, Italian and Portuguese can score Latin text, and Russian scores the Russian alphabet; their data loads only when you pick them.

What does the Index of Coincidence clue mean?

The Index of Coincidence is the chance that two letters picked at random from the text are equal. A Caesar shift does not change it, so a value near the language's normal figure fits a single-alphabet cipher, while a value well below it is a clue — never proof — for a polyalphabetic cipher such as Vigenère. The clue needs at least 40 letters and always shows the numbers it used.