Text Encoder & Decoder

Encode and decode text as hex, binary, octal, decimal, URL, HTML entities, Base32, ROT13 or Morse — every representation at once, UTF-8 correct.

Runs entirely in your browser — nothing is uploaded

Text

About the Text Encoder & Decoder

Paste any text and see it as hex, binary, octal, decimal, ASCII and Unicode code points, U+ escapes, URL percent-encoding, HTML entities, Base32, ROT13 and Morse — all eleven at once, each with its own Copy button. Switch to Decode mode and it runs the other way: choose a format, or let auto-detect guess from the shape of what you pasted and tell you what it guessed. Emoji, Chinese, Arabic, Devanagari and combining accents round-trip correctly through every format that can carry them.

The non-obvious part of this problem is that bytes and characters are different things, and most encoding bugs live in the gap between them. The waving-hand emoji is one character, four UTF-8 bytes, two UTF-16 code units, and the number 128075 — four different answers, all correct, to four different questions. Hex, Binary, Octal and Decimal here list *bytes*; Character codes and Unicode escapes list *characters*. The tool shows the character count, the UTF-16 count and the byte count side by side, so you can see which number the database column limit or the API error is actually talking about. It also handles the classic trap: charCodeAt() on an emoji returns 55357 56832, two UTF-16 surrogate halves rather than one character, and pasting those into Character codes recombines them and says that it did.

Every decoder here refuses to guess. The byte formats decode through a strict UTF-8 decoder, so 48 65 6c 6c 6f e9 does not quietly become Hello with a replacement character on the end — it reports that byte 0xE9 at position 5 is not valid UTF-8 and that the data is most likely Latin-1. Percent-decoding names which % escape is malformed and where. A bare + in text you decode as a URL gets flagged, because + means a space in form data and a literal plus everywhere else, and getting that backwards silently corrupts every space in the string. Base32 rejects a length that cannot exist instead of returning truncated bytes. Silence is the failure mode that costs an afternoon; an error with a byte offset in it costs seconds.

A few things are worth stating plainly. ROT13 and Base32 are not encryption — they are reversible in one click and provide no secrecy whatsoever. Morse is lossy by design: it has no upper and lower case and no code for #, %, * or any non-Latin script, so unsupported characters are dropped and listed by name rather than silently vanishing. HTML entity decoding covers the HTML 4 named set — about 250 names — plus every numeric reference; an unrecognised name is left untouched and reported instead of guessed at. — decodes to an em dash rather than an invisible control character, because that is what every browser does with the 128–159 range. And encodeURIComponent deliberately leaves !, ', (, ) and * unescaped, which is fine for a query string and wrong for an OAuth or AWS signature — hence the strict RFC 3986 option.

Everything runs inside your browser using standard web APIs. Your data is never uploaded, never stored on a server, and never leaves your device — you can confirm that by opening your browser devtools Network tab, or by switching off your Wi-Fi and using the tool offline.

Frequently asked questions

Why is one emoji four bytes but one character?

UTF-8 is variable width: ASCII takes one byte per character, most European accents take two, most CJK takes three, and emoji take four. JavaScript adds a third number, because it stores strings as UTF-16, where an emoji occupies two code units — which is why '👋'.length is 2 rather than 1. The tool shows characters, UTF-16 units and UTF-8 bytes together so you can tell which one a column limit or a length error is really counting.

I pasted hex and got "not valid UTF-8". What now?

It means those bytes are not UTF-8 text. Usually they are Latin-1 or Windows-1252, where every byte is one character, so é is the single byte E9 rather than the pair C3 A9. This tool decodes UTF-8 only and says so, with the offending byte and its position, instead of substituting replacement characters — output that looks almost right is worse than an error. Re-export the data as UTF-8, or convert it with a command such as iconv -f latin1 -t utf8.

What is the difference between %20 and + for a space?

%20 is a space anywhere in a URL. + means a space only inside application/x-www-form-urlencoded data — query strings produced by HTML forms, and form POST bodies — and is a literal plus sign everywhere else. Decoding with the wrong rule turns every space into a plus or every plus into a space, and neither mistake is visible until something downstream breaks. Pick the URL mode that matches where the string came from; the decoder warns when it sees a bare + outside form mode.

Can I use ROT13 or Base32 to hide something?

No. Both are encodings, not ciphers, and this page reverses either in one click. ROT13 exists to hide spoilers from casual reading. Base32 exists so binary data can survive case-insensitive systems such as DNS labels and filenames. Neither offers any confidentiality at all — use real encryption if that is what you need.

Which Base32 alphabet should I pick?

RFC 4648 (A–Z, 2–7) is the default and what "Base32" means unqualified. base32hex (0–9, A–V) sorts in the same order as the bytes it encodes, which matters for keys in an ordered store. Crockford drops I, L, O and U so a handwritten or dictated string cannot be misread, and decodes I and L as 1 and O as 0 — it is the alphabet ULIDs use. The three produce different strings from the same input, so decoding with the wrong one gives you an error or garbage.

Why did characters disappear from the Morse output?

International Morse only defines A–Z, 0–9, a short list of punctuation and a handful of accented letters. Anything else — #, %, emoji, CJK, Cyrillic — has no code at all, so it is dropped and named underneath the result rather than replaced with something that would decode into the wrong letter. Morse also has no case, so decoding always returns uppercase; that is a property of the code, not a limitation of this tool.

Is there a size limit?

Only your device's memory. Above 50,000 characters the eleven-format view stops recalculating on every keystroke — building all of them takes long enough to make typing stutter — and offers a button to run it once on demand instead. Decode mode has no such threshold. Nothing is uploaded either way, so there is no server-side quota to hit.