Skip to content

Encoding

Unicode Escape Encoder / Decoder

Encode text into Unicode escape sequences or decode escaped Unicode back into readable text.

Loading tool…

About this tool

What is Unicode Escape Encoder / Decoder?

Inspect escaped Unicode when copying text between source code, logs and configuration. An escape is a written representation of a character, not the character's UTF-8 bytes. Choose the notation expected by the destination and decode a small sample before converting a large string, particularly when emoji or combining marks are involved.

A worked example

Represent an accented character with a basic Unicode escape

Example input

é

Expected result

\u00e9

Encode the letter using basic four-digit escapes and lowercase HEX. Decoding the result restores the same character. Characters outside the basic multilingual plane need a surrogate pair in this notation, or a braced code-point escape in a language that supports it. A JSON document and a JavaScript string literal do not accept every notation interchangeably.

Common mistakes and limits

  • A literal backslash in a JSON string must itself be escaped. Check whether the destination expects readable text, an escape sequence or a complete serialized string.
  • Escaping does not normalize visually equivalent Unicode sequences or make unfamiliar text safe. Use the invisible-character inspector for hidden controls and unusual spaces.

Features

What you can do

  • Encode Unicode characters.
  • Decode Unicode escape sequences.
  • Support \uXXXX notation.
  • Support \u{XXXXX} notation.
  • Support UTF-16 surrogate pairs.
  • Handle emoji correctly.
  • ASCII-only encoding mode.
  • Uppercase or lowercase hexadecimal output.
  • Copy transformed output.
  • Live statistics.
  • Runs locally in your browser.

Frequently asked questions

Questions about Unicode Escape Encoder / Decoder

Which escape formats are supported?

The tool supports classic \uXXXX escapes, braced \u{XXXXX} escapes and UTF-16 surrogate pairs.

Does it support emoji?

Yes. Emoji and every valid Unicode code point are correctly encoded and decoded.

Does it upload my data?

No. Everything is processed locally inside your browser.

Related tools