AZ Tools

Unicode Escape Converter

Developer

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.

Output

How to use

  1. Pick a direction: Text → Escapes or Escapes → Text.
  2. For encoding, choose the format and whether to escape every character or just non-ASCII.
  3. 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.

Related tools