Skip to main content
HandyWeb

Unicode Escape and Unescape

Convert text to Unicode escapes such as \u0633 or U+0633, or decode strings such as \u0633\u0644\u0627\u0645 back to readable text.

Runs on your device.

Operation
Format
0 characters0 bytes
0 characters0 bytes

How to Use It

  1. Choose Escape or Unescape.
  2. To escape, choose the output format: JS / JSON, ES6, Python, or U+XXXX.
  3. Paste the text, then copy the output.

Questions and Answers

Why does one emoji have two \u escapes?

JavaScript and JSON store text as UTF-16. Characters above U+FFFF, such as most emoji, take two units (a surrogate pair) in UTF-16. The ES6 and Python formats write each character as one escape.

Which format do I need?

JS / JSON for JSON, JavaScript, Java, and C#. Python for Python code. U+XXXX to write about a character or to look it up.

Good to Know

Unescape decodes only Unicode escapes. Other sequences, such as \n or \t, stay as they are.

Source code of this toolReport a problem on GitHub