StegoToolkit

Encoding Auto-Decoder

Auto-detect and decode Base64, hex, URL, ROT13, gzip and 15+ more formats — peels nested layers, explains why it chose each format, finds encoded blobs in pasted text, and flags CTF flags at every layer.

Auto-detect
12-layer chains
Runs in your browser
Encoding Auto-Decoder

Decode as

Leave on Auto-detect and the tool picks the best format — or choose one yourself, then press Decode (Ctrl/⌘ + Enter).

Try an example — no need to find a string first

Paste a string to decode

Supports Base64 · Hex · URL · Binary · Octal · ROT13 · Morse · Base32 · HTML entities · Caesar · gzip + more

Nothing is uploaded. All decoding runs in your browser.

How to decode an encoded string (4 steps)

  1. Paste a string: Paste the encoded text (up to 64 KB), or arrive with a value already loaded from the Strings Analyzer, Hex Viewer, EXIF Viewer or PNG Chunk Analyzer. Switch on Batch mode to decode up to 20 strings, one per line.
  2. Check the detection: The tool ranks every format it thinks is possible and shows the evidence for each one. Open “Why?” to see the reasons, or pick a format yourself — including custom alphabets and all 25 Caesar shifts.
  3. Read the layers: With auto-chain on, each decoded layer is re-analysed and decoded again until plaintext or a flag appears. Every layer shows its format, confidence, entropy and any repairs that were needed.
  4. Follow up: Copy the result, export the chain as JSON, copy it as a CyberChef recipe, replay the same chain on other strings, or hand a layer to the Hex Viewer.

Decode Base64, Hex, URL and 15+ Formats Without Uploading

Paste an encoded string and this tool works out what it is, decodes it, and keeps going if the result is encoded again. Everything runs in your browser tab with plain JavaScript: the text you paste is never sent to a server, never put in the page address, and never passed to analytics.

That matters for CTF work, where the string in front of you may be challenge data you would rather not paste into a random website. Nothing you paste is stored. The only things kept on your device are the flag prefixes you choose to add and which result tabs you have pinned (both in this browser's localStorage) and, if you hand a value to or from another CTF Lab tool, that single value in IndexedDB for up to 30 minutes.

How the Encoding Auto-Detector Works

Each format has a detector that returns a score from 0 to 100 and a list of reasons. The score combines three things: how much of the input fits the format's character set (up to 50 points), whether the length obeys the format's rule — a multiple of 4 for Base64, 8 for Base32, even for hex (up to 30), and format-specific markers such as = padding, 0x prefixes, %XX pairs or a begin line (up to 20).

Very short strings are penalised because almost anything is valid in several formats, and unpadded lowercase words are down-weighted so ordinary text is not mistaken for Base64. Candidates scoring 50 or more are explored; the ranked list and the evidence behind each score are always shown, so you can judge and override.

Recognise the Encoding by Eye

What each format looks like, the length rule it follows, and a worked example.

FormatCharactersLength ruleExampleDecodes to
Base64A–Z a–z 0–9 + / =Multiple of 4aGVsbG8=hello
Base64 URL-safeA–Z a–z 0–9 - _Multiple of 4 (padding often omitted)aGVsbG8hello
Base32A–Z 2–7 =Multiple of 8NBSWY3DPhello
Hex0–9 a–fEven68656c6c6fhello
URL encodingany + %XXAnyhello%20worldhello world
HTML entitiesany + &…;Any&lt;b&gt;<b>
Binary0 1 and spacesGroups of 8 bits01101000 01101001hi
Decimal0–9 and spacesValues up to 255104 105hi
Octal0–7 and spacesValues up to 377150 151hi
Morse. - / and spacesAny.... ..HI
ROT13lettersSame as inputuryybhello
ROT47! through ~Same as input96==@hello
gzip / zlibbinary (usually inside Base64)Magic bytes 1F 8B / 78 xxH4sI…(decompressed text)

Multi-Layer Chain Decoding for CTF Challenges

Challenge authors stack encodings: a flag is hex-encoded, then Base64-encoded, then ROT13'd. Auto-chain decodes the outermost layer, re-runs detection on the result, and repeats up to 12 layers deep, showing every intermediate step with its entropy, printable share and any flag found.

Worked example: NjY2YzYxNjc3YjY4Njk3ZA== is Base64 for the hex string 666c61677b68697d, which is hex for flag{hi}. The tool shows exactly that three-row chain and stops at the flag. When a string is valid in two formats at once — deadbeef is both hex and Base64 — the Branch Explorer follows both and lists each reading under “Other paths”. If a reading ends in readable text it becomes the main chain; if none does, the main chain stays on the input and says it is ambiguous.

Supported Encoding Formats

FormatWhat it coversDetection
Base64 (standard, URL-safe, unpadded)Radix-64 text; the most common CTF wrapperAuto + custom alphabet
Base32RFC 4648 alphabet, padded or notAuto + custom alphabet
Base58Bitcoin alphabet (no 0 O I l)Auto + custom alphabet
Base85 / Ascii85With or without <~ ~>, z shortcutAuto + custom alphabet
HexPlain, spaced, 0x-prefixed, \x-escaped, colon-separatedAuto
URL encoding%XX sequences and + for spaceAuto
HTML entitiesNamed, decimal and hexadecimalAuto
Unicode escapes\uXXXX, \u{…}, \xXX, U+XXXXAuto
Binary / Octal / DecimalASCII codes written in base 2, 8 or 10Auto
Morse code/, | or double-space word separatorsAuto
UUencodingWith or without begin/end headersAuto
ROT13, ROT47, AtbashLetter and symbol substitutionProposed only when clearly better
Caesar (all 25 shifts)Shown as a table so you can spot the right shiftManual
gzip, zlib, raw deflateBrowser DecompressionStream, size-cappedgzip/zlib auto, raw deflate manual
Single-byte XORQuick check of the first 4 KB — up to 3 candidate keysAuto fallback
JWTOnly the payload segment is decoded; header and signature are not analysed (a dedicated JWT decoder tool is not live yet)Auto

What is Base64 Encoding?

Base64 turns arbitrary bytes into 64 printable characters (A–Z, a–z, 0–9, + and /) so binary data can travel through systems built for text: email attachments, data URIs, HTTP Basic authentication headers and JSON fields. Every 3 input bytes become 4 output characters, which is why the output is about a third larger and why = padding appears when the input is not a multiple of 3 bytes.

It is an encoding, not encryption: anyone can reverse it, which is exactly why CTF authors use it as a first layer of obfuscation. The URL-safe variant swaps + and / for - and _ so the text survives in links and file names, and many implementations drop the = padding, so a string whose length is not a multiple of 4 can still be valid Base64.

Base64 vs Hex vs URL Encoding — When is Each Used?

Hex writes each byte as two digits (0–9, a–f), doubling the size but staying easy to read and type; it dominates hashes, memory dumps and byte-level challenges. Base64 is denser (about 133% of the original) and is the default for embedding binary in text. URL encoding is different in kind: it leaves safe characters alone and replaces only unsafe ones with %XX, so it appears in web requests, query strings and logs rather than as a general binary wrapper.

A quick way to tell them apart by eye: only 0–9 and a–f in pairs means hex; a mix of upper case, lower case and digits ending in = means Base64; percent signs mean URL encoding. Some strings fit more than one format, such as deadbeef, which is valid hex and valid Base64 — in that case the tool follows both and ranks the results rather than guessing.

How to Decode Hex to Text Online

Paste the hex into the input box — plain pairs (68656c6c6f), spaced pairs (68 65 6c 6c 6f), 0x-prefixed bytes or colon-separated bytes all work. The detector picks it up automatically; if it does not, choose Base16 / Hex in the format picker. If the digit count is odd the last digit is dropped and the layer shows a warning, so you know a byte was incomplete rather than having it silently changed.

Each pair of digits becomes one byte, so 68 65 6c 6c 6f becomes h, e, l, l, o. If the bytes are not readable text — for example, a 32-digit string that is really an MD5 hash — the layer says so and shows a hex dump instead of printing garbage, and it points you to the Hex Viewer when you want to look at the raw bytes.

CTF Walkthrough: Peeling a Three-Layer Challenge

A typical beginner challenge hides a flag under two or three layers of encoding. Say the string is NjY2YzYxNjc3YjY4Njk3ZA==: the tool sees a length divisible by 4, a trailing = and a mixed-case alphabet, scores Base64 at the top, decodes it, and finds 666c61677b68697d — a run of hex digits in pairs. The hex layer decodes to flag{hi}, the flag pattern appears, and the chain stops there with the whole path shown.

If the hex had been ROT13-shifted first, you would see a third layer. Because every layer shows its entropy, printable share and the reasons behind its format, you can check each step instead of trusting the final answer. When the flag format is not flag{...}, add your event's prefix once in Advanced options and it is highlighted at every layer from then on.

CTF Tips: Finding Hidden Flags in Encoded Data

Look at the shape before you decode: a long string ending in = is almost certainly Base64; only 0–9 and a–f in pairs is hex; %XX means a URL; dots, dashes and slashes mean Morse. Add your event's flag prefix (THM, CTF-, …) so highlighting works at every layer, not only the last one.

If a decode produces gibberish, check the other paths before assuming you chose wrong — the same string can be valid in two formats. If the output stays high-entropy and unreadable, it is probably encrypted, compressed or XOR'd rather than encoded; the quick XOR check tries all 255 single-byte keys on the first 4 KB. Pasted a whole log or email instead of a clean string? Use the embedded-blob finder to locate the encoded runs inside it.

Examples

Input: NjY2YzYxNjc3YjY4Njk3ZA==

Result: Base64 → hex → flag{hi}

Meaning: A Base64 layer wraps a hex string that spells a flag. Auto-chain stops as soon as the flag pattern appears.

Input: NjggNjUgNmMgNmMgNmY=

Result: Base64 → hex (spaced) → hello

Meaning: Base64 hides space-separated hex pairs; the second layer decodes to plain text.

Input: deadbeef

Result: Two readings — hex (4 bytes) and Base64 (6 bytes) — and the main chain stays on the input

Meaning: Both formats accept this string, and both decode to bytes with no file signature and nothing readable. The Branch Explorer follows both and lists them under Other paths, but the main chain stays on the input and shows an “Ambiguous” notice instead of choosing one for you.

Input: synt{uryyb}

Result: ROT13 → flag{hello}

Meaning: Letter-substitution ciphers are only proposed when the decoded text is clearly more English-like or matches a flag format, which stops endless ROT loops.

Input: aGVs!bG8=

Result: Base64 → hello, with a warning: 1 character ignored at position 5

Meaning: Lenient mode repairs damaged input and lists every change. Strict mode refuses the same input.

How it works

1. Detect

Every detector scores the layer and records reasons. Strings under 8 characters are penalised; ordinary words are not mistaken for Base64.

2. Branch

Each candidate scoring 50 or more (max 3 per layer) is decoded. Failures, runaway growth and repeated outputs are discarded; the search stops at 12 layers, 60 nodes or a time budget.

3. Analyse every layer

Entropy, printable share, a composite plaintext score, flag patterns and hash-shaped strings are computed for each layer, not just the last.

4. Rank

Leaves are ranked by plaintext score plus a flag bonus. The best path is the main chain; the rest are kept under “Other paths”. If the best path would end in bytes with no file signature and nothing readable, the main chain is cut back to the last readable layer and an Ambiguous notice explains why.

What the results mean

ResultWhat it meansWhat to do
Plaintext reachedThe layer's plaintext score is 70 or more: it reads like English-like text, and no format detector still matches it strongly (a strong detector match lowers the score).You are done — or check Other paths for a better reading.
Flag patternA flag{…}, ctf{…}, htb{…}, picoctf{…} or your own format was found in a layer.Copy it. The chain stops there unless you turn off “Stop on first flag”.
Possible hashA 32, 40 or 64 digit hex string — the algorithm is inferred from length only.Identify it with a hash tool; do not assume MD5/SHA-1/SHA-256.
No encoding detectedNo format scored 50 or more.The input may be plaintext, encrypted, or use an unsupported or custom scheme.
Binary outputMore than 15% of the bytes are control bytes, or the bytes are not valid UTF-8 and mostly non-printable.Shown as a hex dump; open it in the Hex Viewer.
Looks like: PNG image (etc.)The decoded bytes start with a known file signature (PNG, JPEG, GIF, PDF, ZIP, ELF, WAV, …).Save or inspect it — the Hex Viewer and File Type Detector pick up from here.
AmbiguousThe next decode would give bytes with no file signature and nothing readable — the string may be an ID or token that only looks encoded, or it may be encrypted data.The chain stays on the last readable layer. Click “Decode this layer” to continue anyway, or check Other paths.
High entropy, unreadableEntropy near 8 bits/byte with no format match.Likely encrypted or compressed; try the quick XOR check or a full XOR tool.

Limitations

  • Text input only — there is no file upload. For files, use the Hex Viewer or the Strings Analyzer and hand strings over.
  • Not a cipher solver: Vigenère, Playfair and unknown ciphers are out of scope. Caesar is manual (all 25 shifts); ROT13/ROT47/Atbash are proposed only when they clearly improve readability. For a ranked Caesar solver with flag-prefix detection, use the ROT13 & Caesar Cipher Solver.
  • Not a hash cracker or identifier — hash-shaped strings are labelled “inferred from length only”.
  • Quick XOR check covers single-byte keys on the first 4 KB only; multi-byte keys need a dedicated XOR tool.
  • Detection is heuristic. A string that is itself valid Base64 (a random token such as 86g411asQ…) may be decoded one layer further than you want — the original always stays visible as its own layer, other candidate paths are listed under Other paths, and you can pick the format yourself. Very short inputs (1–2 characters) are ambiguous, and ROT13 of jargon-heavy technical text may not be proposed automatically.
  • Entropy is a hint, not a verdict: hex text cannot exceed 4 bits/byte and English sits around 4–4.5, and strings under 32 bytes are “too short to judge”.
  • gzip/zlib/deflate need a browser with DecompressionStream; output is capped at 5 MB per step and 10 MB per chain.
  • Base58 decoding is quadratic-time and limited to 8,192 characters. Custom alphabets are manual — auto-detect never guesses them.
  • Custom-regex flag formats are length-limited and run on at most 16 KB of text; patterns with nested quantifiers are rejected.

Privacy

Everything is decoded in your browser; the text you paste is not uploaded, never appears in the page address, and is not sent to analytics. Decoded layers 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. Any custom flag prefixes you add and which result tabs you have pinned are remembered in this browser's localStorage — your input and output never are. If you accept analytics, only coarse usage events are recorded, never input or output.

Frequently Asked Questions

What is a Base64 decoder?

A Base64 decoder converts Base64-encoded text back to its original form. Base64 is an encoding scheme that turns any data into a string of 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is widely used in email attachments, data URIs, HTTP Basic authentication and CTF challenges. Decoding reverses the process to reveal the original content.

How do I decode Base64 online without uploading my file?

Paste your Base64 string into the input field. The decoding runs in your browser with JavaScript: your text is not uploaded to a StegoToolkit server and is never placed in the page address. If you accept analytics, only coarse usage events are recorded (for example that a decode ran), never the text. The result appears shortly after you stop typing.

How do I know what encoding format my string uses?

You do not have to: auto-detect scores every format and shows the evidence. A string of A–Z, a–z, 0–9, + and / with a length divisible by 4 is almost certainly Base64; hex digits in pairs are hex. The tool ranks all candidates and you can override the choice from the format picker.

Can this tool decode multiple layers of encoding?

Yes. CTF challenges often nest encodings — for example hex inside Base64 inside ROT13. Auto-chain detects and decodes each layer in sequence (up to 12), showing every intermediate step with its entropy and any flag found. Turn auto-chain off to step through one layer at a time.

What is the difference between Base64 and Base64 URL-safe?

Standard Base64 uses + and /, which are reserved in URLs. URL-safe Base64 replaces them with - and _ so the text can be used in URLs and file names without percent-encoding, and often omits the = padding. This tool detects both and treats missing padding as a repairable condition, with a warning.

How do I decode hex to text?

Paste the hex (68656c6c6f, 68 65 6c 6c 6f, 0x68 0x65 or 68:65:6c) into the input. The detector normally picks it up; otherwise choose Base16 / Hex in the format picker. If the digit count is odd, the last digit is dropped and a warning is shown.

Why does my Base64 string end with one or two = signs?

Base64 encodes 3 bytes as 4 characters. When the input is not a multiple of 3 bytes, = padding fills the last group: one = means the final group had 2 bytes, two = means it had 1 byte. Some implementations omit padding; this tool accepts both and reports when it had to add it.

What is URL encoding / percent-encoding?

URL encoding replaces characters that are unsafe in URLs with % followed by two hex digits, so a space becomes %20 and { becomes %7B. It is common in web CTF challenges where request parameters, cookies or paths carry encoded payloads. Double encoding (%2520) is handled by the chain automatically.

Can I decode Morse code with this tool?

Yes. Paste dots and dashes with spaces between letters and /, | or a double space between words — for example .... . .-.. .-.. --- decodes to HELLO. If no word separator is present, the layer says word boundaries were assumed at spaces.

What is ROT13 and why is it used in CTF?

ROT13 shifts each letter 13 places, so applying it twice returns the original — it is its own inverse. CTF authors use it as a light obfuscation layer. The tool proposes ROT13, ROT47 (all 94 printable ASCII characters) and Atbash only when the decoded text is clearly more readable or matches a flag format; Caesar is available manually with all 25 shifts side by side; for a ranked brute force with flag-prefix detection, open the ROT13 & Caesar Cipher Solver.

What does “entropy” mean in this decoder?

Shannon entropy measures how random the bytes of a layer are, from 0 to 8 bits per byte. Natural-language text is usually around 3.5–4.5, Base64 text around 5.5–6, and encrypted or compressed data close to 8. It is shown as a hint only: hex text can never exceed 4 bits and strings under 32 bytes are too short to judge, so the tool never stops a chain on entropy alone.

Can I decode multiple strings at once?

Yes. Turn on Batch mode and paste up to 20 strings, one per line. Each is decoded independently and the results are ranked so flags and readable decodes come first. You can also record a chain from one string and replay it on the others without re-detecting.

How is this different from CyberChef or other “magic” decoders?

CyberChef is a much larger toolkit — hundreds of operations and a recipe system — and its Magic operation can also detect and unwrap nested encodings. This tool is narrower and built around the CTF triage step: it ranks several possible readings when a string fits more than one format, explains the evidence for each, stops on a flag pattern at any layer, finds encoded runs inside pasted text, lets you add your own flag prefixes, replays a found chain on other strings, and hands values to and from the other StegoToolkit forensics tools. For large custom pipelines, use CyberChef — this tool can copy your chain as a CyberChef recipe (operation names only, no input).