Unicode escape converter
- What you would call characters
- 12
- Code points
- 12
- UTF-16 code units
- 12
- UTF-8 bytes
- 16
Inspected in your browser · nothing is uploaded
Escapes every non-ASCII character into JavaScript, HTML, CSS or URL notation, and decodes escapes back into characters. The unescaped box always shows what your input decodes to, so it works in both directions at once.
How to use the unicode escape converter
You need this when something in the chain cannot carry the character itself. A properties file that must be plain ASCII, a legacy system that mangles anything above 127, a CSS content value, a URL query string. Escaping keeps the meaning while making the bytes safe.
The four styles are genuinely different, not just cosmetic. JavaScript uses \u00E9, and above U+FFFF must use the brace form \u{1F600}. HTML uses é or é, and either is fine. CSS uses \E9 followed by a space — and that trailing space is required, because CSS escapes are variable-length hexadecimal and the space is what marks the end. Leaving it out means the next character gets absorbed into the escape, which produces a completely different glyph or nothing at all.
URL encoding is the odd one out: it escapes bytes rather than characters, so é becomes %C3%A9 — two escapes for one character, because that is its UTF-8 representation. This is why a URL containing accents looks so much longer than the text, and why percent-decoding a string byte by byte gives nonsense if you do not reassemble the UTF-8 afterwards.
Double-escaping is the failure to watch for. Text that has been escaped twice shows \\u00E9 or é, and decoding it once leaves an escape still visible. That means something in your pipeline is escaping an already-escaped value — worth finding, because it will happen again.
Questions
CSS escapes are variable-length hex, so the space marks where the escape ends. Without it the next character is absorbed into it.
URL encoding escapes bytes, not characters, and é is two bytes in UTF-8. That is why accented URLs look so long.
It was escaped twice. Decode again, then find where in your pipeline an already-escaped value is being escaped.
Only the brace form \u{1F600}. The four-digit form cannot express it.
No. Everything happens in your browser — you can load the page, go offline, and it still works.