Decode This
Paste any encoded string and the decoder identifies hex, Base64, URL encoding, binary, HTML entities or a JWT, then shows the decoded text. Strings valid in several encodings list every reading, most likely first. Nothing is sent from your browser.
Base64 · high confidence
Decodes to readable UTF-8 text.
(for input encoded in layers)
More options: Base64 decoder
How the decoder identifies an encoding
An encoded string rarely says what it is, but each common format has features that no other shares, and the decoder tests for them one after another. A JWT has two dots and starts with a JSON header. Binary is only zeros and ones in a multiple of eight. URL encoding has %XX escapes that decode cleanly. HTML entities have the &name; or &#number; form. Hex is made of digit pairs. Base64 has a restricted alphabet, a length of four per group and a result that makes sense. Every test that matches adds a reading to the list.
For each reading the tool decodes the bytes, checks whether they are valid UTF-8 and mostly printable, and looks at the first bytes for a file signature. The reading gets a confidence level from what it found: high when the result is readable text or a recognizable file, or when the notation is unmistakable, medium when it is plausible, and low when the string fits the format but the result is noise. The readings are sorted by confidence, so the likeliest is on top.
Telling the formats apart by eye
You can often tell the format before running anything. The features in the table are the ones the detection relies on, with the example each is built from. The detail columns are produced by the same detector as the tool above.
| Format | What it looks like | Strongest clue | Page |
|---|---|---|---|
| Hex | 48 65 6C 6C 6F or 48656c6c6f or 0x48, 0x65 | Only 0-9 and A-F, an even number of digits, often pairs with separators | Hex decoder |
| Base64 | SGVsbG8sIFdvcmxkIQ== | Letters, digits, + and /, length a multiple of 4, = at the end | Base64 decode |
| Base64URL | SGVsbG8sIFdvcmxkIQ | The same with - and _, no padding | Base64 decode |
| URL encoding | Hello%20World%21 | %XX escapes; + for space in forms | URL decoding |
| Binary | 01001000 01101001 | Only 0 and 1, groups of 8 | Binary to hex |
| HTML entities | <b> or H | Ampersand, name or number, semicolon | HTML entity decoding |
| JWT | xxxxx.yyyyy.zzzzz | Two dots; the first part decodes to JSON with alg | Decoded here, not verified |
Each row can be checked by hand. The Base64 in the example decodes to the text Hello, World!, and the hex row decodes to Hello. The ordering of the checks reflects how specific they are. A string with exactly two dots and a JSON header is a JWT beyond reasonable doubt, whereas a string of letters and digits is only possibly Base64. The less specific a test is, the lower the confidence it can earn.
Ambiguous input: when two readings are both valid
Hex is made of Base64 characters, so every hex string that has a length divisible by four is also valid Base64, and every string of zeros and ones is also valid hex. The detector does not hide this. It lists each reading with its result, and the confidence tells you which to try first. The table runs a set of example inputs through the detector and shows what comes back.
| Input | Readings, most likely first | First result |
|---|---|---|
| 48 65 6C 6C 6F | hex (high) | Hello |
| SGVsbG8sIFdvcmxkIQ== | base64 (high) | Hello, World! |
| Hello%20World%21 | url (high) | Hello World! |
| 01001000 01101001 | binary (high), hex (high), base64 (low) | Hi |
| <b>Hi</b> | html-entities (high) | <b>Hi</b> |
| eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC… | jwt (high) | {"sub":"1234567890","name":"John Doe"} |
| deadbeef | hex (medium), base64 (low) | 4 bytes, not text |
| cafe | hex (medium), base64 (low) | 2 bytes, not text |
| 1010 | hex (medium), base64 (low) | 2 bytes, not text |
Short strings are the most ambiguous. The word cafe is valid hex (CA FE) and valid Base64, and decodes to bytes that are not text in either reading. deadbeef gives a hex reading of four bytes and a Base64 reading of six, both without text. Resolve a case like this from where the string came from: a hash or a color code is hex, a token in a header or a field in JSON is more likely Base64, and a long string with a mix of upper and lower case is Base64 almost without exception.
How the confidence level is decided
High, medium and low are not probabilities. They summarize how much evidence the detector found. A high reading has either a notation that cannot be anything else (a JWT with a JSON header, URL escapes that decode cleanly, entity references) or a decoded result that is readable text or a known file. Hex with separators or prefixes is high as well, since plain text is unlikely to look like pairs of digits with spaces between them.
Medium means the string fits the format and nothing contradicts it, for example hex made only of digits and letters A to F with an even count but no readable result. Low means that the string fits, but the decoded bytes are noise and the format is the ambiguous one: a Base64 reading of an all-hex string is the typical case. The labels exist to order the list, and when two readings are both plausible you should decide from where the string came from.
Things people paste, and what they usually are
| It looks like | It is usually | Typical source |
|---|---|---|
| dXNlcjpwYXNz | Base64 of user:pass | An Authorization: Basic header |
| eyJhbGciOiJIUzI1NiJ9… | A JWT | An Authorization: Bearer header, a cookie |
| =?UTF-8?B?SGVsbG8=?= | Base64 inside an email header word | A Subject or From header |
| %7B%22a%22%3A1%7D | Percent-encoded JSON | A query string or a form body |
| 48 54 54 50 2F 31 2E 31 | Hex of ASCII text | A packet capture or a serial log |
| H4sIAAAAAAAA… | Base64 of gzip data | A compressed payload in JSON |
| iVBORw0KGgo… | A PNG image in Base64 | A data URI or an API field |
| Hello | HTML numeric references | Obfuscated or escaped HTML |
| 32 hex digits | An MD5 digest or a UUID | A checksum list or an ID |
Several of those are two layers deep. The header word in the third row is a Base64 string inside a different wrapper; the detector sees the whole thing as text with escape-like punctuation, so strip the =?UTF-8?B? and ?= first. The same is true of the data URI prefix in the image case. The more specific the pattern, the more likely a small manual trim is the fastest route.
Layered encodings: Base64 inside URL encoding, and so on
Data is often encoded more than once. A value is Base64-encoded, put in a URL parameter and percent-encoded because the Base64 contains + and /; or an API returns a Base64 string that holds JSON, which itself holds another Base64 field. Each layer has to be peeled in order, outermost first. The percent-encoded layer here is easy to spot by the %2B and %2F in the string, which are the escaped + and /.
With a text result, the button Decode this result again places the output in the input box and runs the detection once more. Repeat until the result is readable or no encoding matches. The usual stack depth is two, rarely three. A pile of seven layers is almost always a puzzle or a deliberately obscured payload, and it means the same thing at the end of each step: you are looking at transport formats, not at protection.
Reading a JWT
A JSON Web Token is three Base64URL strings joined by dots: the header, the payload and the signature. The header names the algorithm and the type, the payload holds the claims (who the token is for, when it expires, what it grants) and the signature binds the two to a key. The first two parts decode to JSON. The sample token above gives the header {"alg":"HS256","typ":"JWT"} and a payload with a subject and a name.
Decoding shows what a token claims; it does not show whether the claims are true. Only a signature check with the right key does that, and that happens on the server that issues or consumes the token. The format is specified in RFC 7519. Reading a token is a normal debugging step, but since the payload is not encrypted, nothing sensitive should be put in a JWT in the first place.
What the decoder cannot decode
Many searches for decode this are about something other than a transport encoding. Encryption (AES, RSA) needs a key and shows up as noise. Hashes (MD5, SHA-1, SHA-256) are one-way and cannot be reversed, only guessed against; the length is a clue to the algorithm: 32 hex digits is MD5, 40 is SHA-1, 64 is SHA-256. Compression such as gzip and zlib is binary and starts with recognizable bytes (1F 8B for gzip), but it is not Base64 or hex, although it often travels in them.
Classic ciphers are another class. A Caesar or ROT13 shift, Morse code, a substitution cipher or a simple XOR with a key leaves letters in a different order, and the detector does not run those. Puzzles built on them need pattern work, not a decoder. If a string does not match any of the seven formats here, the honest result is none of them, and that is what the tool shows.
When the result does not match what you expected
Plausibility is the test that counts here, and it is a matter of judgment. A successful decode is not proof that the reading is right. Hex is made of characters that Base64 also allows, so a string can decode cleanly in the wrong format and give plausible noise. Compare the result with what you know about the source: a value from an HTTP header is likely Base64, one from a packet capture is likely hex, and a color or a hash is hex by nature.
If the first reading gives noise and the second gives text, take the second. If both give noise, the data is probably binary, and the file type check is the next step: the tool names a recognized signature, and otherwise shows the first bytes so you can compare them against the tables on the hex to ASCII page. When nothing in the list fits, the string may be encrypted, compressed or in a format this tool does not read, and the honest result is that there is no match.
Decoding suspicious strings safely
Security analysts decode obfuscated strings all the time, and the habit is useful for anyone who finds one in a log or an email. Decoding is safe: the tool only turns characters into bytes and shows them, and nothing is run. A PowerShell command with the -EncodedCommand option, for example, takes Base64 of UTF-16 little-endian text, so a decoded result that looks like letters separated by NUL bytes is the command in that encoding; read it with the UTF-16 setting of the hex decoder, and do not execute it.
Treat the result as hostile data. Do not paste a decoded script into a shell, do not open a decoded file with an application that can run macros, and look at the first bytes before anything else: a file that begins 4D 5A is a Windows executable, one that begins 50 4B 03 04 is an archive or an Office document. The detector reports these signatures so that the next step is a conscious one.
Privacy
The detection and the decoding run in your browser. The text you paste is never part of a request, which you can check in the network panel of the browser, and the page does not store it. This matters for the strings people most often bring here: tokens, API responses and values copied out of logs. Even so, treat any live credential as exposed once it appears in a screenshot or a shared link, wherever it was decoded.
The next step for each format
Once the format is known, a dedicated tool gives more control. Hex goes to the hex decoder, which handles character encodings, or to hex to ASCII when the data is plain ASCII. Base64 goes to Base64 decode, and when it holds a picture or a document, to Base64 to image or Base64 to PDF. Binary is converted with binary to hex. Bytes that you want as hex from Base64 go through Base64 to hex.
The same word written six ways
The clearest way to see what the detector sees is to encode one short word in each format and look at the results side by side. The word Hello is five bytes, 48 65 6C 6C 6F, and every row below is a different way of writing those five bytes. The last column is what the detector on this page reports for that exact string, computed when the page was built.
| Format | String | Detected as | Confidence | Decoded |
|---|---|---|---|---|
| Hex, spaced | 48 65 6C 6C 6F | hex | high | Hello |
| Base64 | SGVsbG8= | base64 | high | Hello |
| URL (percent) | %48%65%6C%6C%6F | url | high | Hello |
| Binary | 01001000 01100101 01101100 01101100 01101111 | binary | high | Hello |
| HTML entities | Hello | html-entities | high | Hello |
| Hex, plain | 48656c6c6f | hex | high | Hello |
Every row decodes to Hello, and the detector picks the right format for each. The interesting case is the plain hex form: 48656c6c6f contains only characters that are also valid Base64, so it is a Base64 candidate as well. The tool ranks hex first because it is an even-length string of hex digits that decodes to readable text, and it lists Base64 as a second reading with low confidence, because that reading decodes to bytes that are not text. That ranking, with the second reading shown, is the behavior to expect for any string that fits two formats.
Detecting the format in your own code
A quick check is only a few regular expressions, and writing one is a good way to see why detection is a ranking and not a yes or no. The order matters: test the most specific shapes first (a JWT, then binary, percent escapes and entities) and leave the loose alphabets, hex and Base64, for last. Each of these rules is necessary but not sufficient. A string that passes tells you the format is possible, and the decode tells you whether it is right.
function guess(s) {
const t = s.trim();
if (/^[\w-]+\.[\w-]+\.[\w-]*$/.test(t)) return "jwt?";
if (/^[01\s]+$/.test(t) && t.replace(/\s/g, "").length % 8 === 0) return "binary";
if (/%[0-9a-f]{2}/i.test(t)) return "url";
if (/&(#\d+|#x[0-9a-f]+|[a-z]+);/i.test(t)) return "html entities";
if (/^(0x)?([0-9a-f]{2}[\s:,-]?)+$/i.test(t) && t.replace(/[^0-9a-f]/gi, "").length % 2 === 0) return "hex";
if (/^[A-Za-z0-9+/_-]+={0,2}$/.test(t) && t.length % 4 !== 1) return "base64";
return "unknown";
}Run on the strings above, it returns hex for 48 65 6C 6C 6F, base64 for SGVsbG8=, url for the percent form, binary for the eight-bit groups, and html entities for the numeric references. It also shows the weakness the full decoder works around: deadbeef, cafe and 1010 all return hex, although each could be Base64, and 1010 could be a binary number as well. A rule-based guess cannot resolve those, and neither can any tool, because the string itself does not contain the answer. What helps is context, such as where the string came from, and a look at what each reading decodes to. Length is a useful extra clue: a string of 22 characters is not Base64 of a whole number of bytes, a hex string with an odd number of digits is not hex, and a binary string whose length is not a multiple of eight has lost or gained a bit. The full decoder applies these length checks before it ranks the readings.
Questions about the auto decoder
What does the decoder do with text it does not recognize?
It says that no known encoding matched and shows nothing else. Plain text, a hash, an encrypted value or a custom cipher all fall in that group. The tool never guesses a result it cannot support.
Why does it show more than one result?
Some strings are valid in several encodings. deadbeef is valid hex and valid Base64, and both decodings exist. The most plausible reading is listed first, with the reason and a confidence level, and the rest follow so you can choose.
Can it decode a string that is encoded more than once?
Yes, one layer at a time. Use Decode this result again under a text result to run the detection on the output. A Base64 string that contains URL-encoded text, for example, takes two passes.
Is a JWT decoded or verified?
Decoded only. The header and payload are Base64URL text and anyone can read them. The tool does not check the signature, which needs the key, so the contents of a token must not be trusted on the strength of this page.
Does the text I paste leave my browser?
No. Detection and decoding are done by JavaScript on the page, and the input is not part of any request. It is safe to paste tokens or configuration values here, though you should still avoid sharing live secrets anywhere that is not needed.
