What is Unicode Escape Converter?

Unicode Escape Converter turns escape sequences (like \u0041) into readable characters and back again. Supports JavaScript \uXXXX, HTML entities, Python, and URL percent-encoding, so you can debug i18n strings, decode API responses, or prep text for code.

The converter offers six escape formats. JavaScript \uXXXX covers the basic multilingual plane and uses surrogate pairs for emoji and rarer CJK characters. JavaScript ES6 \u{X} handles any code point in one sequence, so modern source files skip surrogate pairs entirely. HTML numeric entities (&#xHHHH;) work directly in HTML markup and emails. CSS \HHHH goes in the content property in stylesheets. Python uses \uXXXX for the basic plane and \UXXXXXXXX for everything above it, so output pastes straight into Python string literals. URL percent-encoding (%XX) escapes each UTF-8 byte for query strings and path segments. A toggle picks uppercase or lowercase hex digits, and a non-ASCII-only mode leaves printable ASCII untouched so JSON and i18n files stay readable. The character mapping panel shows the code point, official Unicode name, raw UTF-8 bytes, block, and category for every glyph, and you can click any card to copy just that character's escape.

How to use

  1. Step 1 — Paste Unicode escape sequences (e.g., \u0048\u0065\u006C\u006C\u006F) in the input to decode them into readable characters.
  2. Step 2 — Or enter plain text (e.g., Hello) to encode it into Unicode escape sequences in your chosen format.
  3. Step 3 — Pick the escape format (JavaScript \uXXXX, HTML &#xHHHH;, CSS \HHHH, Python \U, or URL %XX) and copy the result. The mapping panel names each character and breaks down its UTF-8 bytes, block, and category; click a card to copy a single escape.

When to use

  • Decoding an API response that returns \u00E9 instead of é so you can verify the data.
  • Encoding non-ASCII text into JSON or JavaScript source so it survives transport through ASCII-only systems.
  • Investigating invisible Unicode characters (zero-width space, BOM) hidden inside a copied string.

Result

An API returns \u0041\u006E\u0064\u0072\u00E9 and you need the actual name. Paste it in to see 'André' — then convert your response text back to escapes for the API payload.

FAQ

Why are some characters encoded as two \uXXXX sequences in JavaScript?
Code points beyond U+FFFF (emoji, ancient scripts, rare CJK) live outside the basic multilingual plane. JavaScript represents them as UTF-16 surrogate pairs, so the rocket emoji becomes \uD83D\uDE80. Modern code can use \u{1F680} instead with ES2015 support.
Which escape format should I use in my code?
Use \uXXXX inside JavaScript or JSON strings, &#xHHHH; in raw HTML markup, \HHHH inside CSS content properties, and URL %XX percent-encoding for query strings and path segments. JSON does not support \u{...} notation, so always stick to \uXXXX with surrogate pairs there.
What's the difference between an escape and an HTML entity?
Both reference the same Unicode code point. Escapes (\u00E9) are processed by the language runtime — JavaScript, CSS, Python. HTML entities (é or é) are processed by the browser when parsing markup. They aren't interchangeable across contexts.
How do I find invisible Unicode characters in a string?
Paste the text and switch to encode mode. The character mapping table lists every code point in order — zero-width spaces (U+200B), byte order marks (U+FEFF), and non-breaking spaces (U+00A0) become immediately visible alongside their escapes.
Can the tool decode \u escapes from Python source code?
Yes. Python's \u0041 and \U0001F680 share the same syntax as JavaScript's \uXXXX and \u{1F680}. Paste the string content (without the surrounding quotes or the leading r prefix) and the decoder returns the readable text.

Related Tools