Unicode Escape Converter
Turn text into Unicode escape sequences and back. Encode to JavaScript/JSON \uXXXX (with surrogate pairs for emoji), Unicode U+XXXX notation, or HTML hex (&#xHEX;) and decimal (&#DEC;) entities — keeping plain ASCII readable, or escaping every character. Decoding auto-detects all of these formats at once (plus \u{...}, \xXX and bare U+ notation), so you can paste mixed escapes and get the original text. Useful for embedding non-ASCII safely in code and JSON, debugging encoding issues, and reading escaped strings from logs. Everything runs locally in your browser.
How to use
- Pick a direction: Text → Escapes or Escapes → Text.
- For encoding, choose the format and whether to escape every character or just non-ASCII.
- Copy the result from the output box.
Frequently asked questions
- How are emoji handled?
- In \uXXXX form, characters above U+FFFF (like 😀) are written as a surrogate pair of two \u escapes; U+ and HTML forms use the single code point (e.g. U+1F600, 😀). Decoding reassembles them correctly either way.
- What can the decoder read?
- It auto-detects \uXXXX, \u{XXXXX}, \xXX, U+XXXX, &#xHEX; and &#DEC; — all in the same input, so mixed escapes still decode.
- What does 'escape all characters' do?
- Off, only non-ASCII characters are escaped and plain ASCII stays readable. On, every character is converted to an escape, which is handy for fully obfuscated or strictly-ASCII output.
- Is my text uploaded?
- No. Encoding and decoding happen entirely in your browser; nothing is sent to a server.
Guides on this topic
Related tools
String Escape Converter
Escape a string for 10 contexts at once — JavaScript, JSON, HTML entities, URL, SQL, regex, Bash (single/double quote), C string, Unicode \u escapes. Copy whichever you need.
Invisible / Zero-Width Character Detector
Spot NBSPs, zero-width characters, bidi marks, and tabs in pasted text — then clean them out.
HTML Entity Encoder / Decoder
Encode HTML special characters (& < > " ') or decode entities back to their original characters.
URL Encoder / Decoder
Percent-encode text for URLs, or decode encoded URLs back to text.
Punycode Converter
Convert internationalized domains between Unicode (`münchen.de`) and Punycode ASCII (`xn--mnchen-3ya.de`).
cURL to fetch / axios Converter
Paste a cURL command — get ready-to-use JS fetch or axios code with headers, body, method, and basic auth handled.