Unicode Escape / Unescape

Convert text to \uXXXX, \u{…}, Python, CSS, HTML or U+ escape sequences and back.

Runs in your browser Free
Processed locally in your browser.

Unescape understands all listed styles at once.

What are Unicode escape sequences for?

Escape sequences let you write non-ASCII characters safely in source code, JSON, .properties files and CSS content values. For example, 'é' can be written as \u00E9 in JavaScript or \E9 in CSS.

Supported formats

  • JavaScript/Java/C#: \uXXXX
  • ES6: \u{1F600}
  • Python: \U0001F600 and \x
  • CSS: \E9
  • HTML numeric entities: é
  • U+00E9 notation

Smart decoding

Decoding recognises different escape styles in the same text. Surrogate pairs for emoji and characters outside the Basic Multilingual Plane are handled correctly. Everything runs in your browser.

How to use Unicode Escape / Unescape

  1. Paste the text or escape sequences.
  2. Choose escape or unescape.
  3. Select the target escape format.
  4. Copy the result.

Why use this tool?

Saves you from working out the right escape format for each programming language by hand.

FAQ

Can it decode mixed escape styles?

Yes. Decoding recognises \u, \u{}, \U, \x, HTML numeric entities and U+ notation in the same text.

Should I escape non-ASCII characters in JSON?

JSON supports UTF-8, so it isn't required, but some older systems expect ASCII JSON with \u escapes.

Why does an emoji become two \u sequences?

Characters above U+FFFF are written as a surrogate pair of two \uXXXX sequences; the \u{...} format uses a single sequence.

Related tools