Skip to content

Menu

Unicode Escape Tool

Escape/unescape Unicode characters

Runs entirely in your browserEncodingFree, no sign-up
Loading tool

01What is Unicode Escape Tool?

Unicode Escape Tool turns characters into escape sequences and back again. You need this when a file, config or protocol only accepts ASCII, and every language spells escapes a little differently. In Escape mode, printable ASCII from space to tilde passes through untouched. Everything else is escaped, including newlines, tabs and the backslash itself. That last part keeps the output from being misread as an escape that was already there. Pick one of seven formats. JavaScript ES2015+ writes \u00E9, and switches to the braced \u{1F44B} form for characters above U+FFFF. JSON / Java / C# keeps to the four-digit form those languages require, so an emoji becomes its UTF-16 surrogate pair, \uD83D\uDC4B. That matches the escape rules in RFC 8259 for JSON. CSS writes \E9 followed by a space, which the CSS syntax spec uses to end a hex escape. HTML Hex gives é and HTML Decimal gives é. Python uses \u00E9, or an uppercase \U with eight digits for astral characters. Rust always uses the braced \u{e9} form in lowercase. So Café 👋 in Python format becomes Caf\u00E9 \U0001F44B. In JSON format it becomes Caf\u00E9 \uD83D\uDC4B. You can paste either straight into a string literal. Unescape mode has no format picker. It reads all the supported styles in one pass: braced \u{...}, Python \U with eight digits, four-digit \u (rejoining surrogate pairs), CSS hex escapes and both kinds of HTML numeric entity. Because it is a single pass, a backslash that was itself decoded is never decoded a second time. A value beyond U+10FFFF, the last valid code point, is left exactly as typed. There are trade-offs. The CSS rule is greedy, so any backslash followed by hex letters gets decoded. A Windows path like C:\cafe turns into C: plus the Hangul character U+CAFE. Named HTML entities such as é are not decoded, only numeric ones. Escape mode also only outputs uppercase hex, except in Rust. A stats bar counts the characters in your input and how many fall outside printable ASCII. That count is a fast way to spot a hidden non-breaking space. All of this runs as string code inside the page, so the text you paste stays on your own machine.

Front-end and back-end developers who need to put non-ASCII text into source files, JSON, CSS or HTML that must stay ASCII-only. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Unicode Escape Tool

  1. Choose a Mode: Escape (chars → sequences) or Unescape (sequences → chars).
  2. In Escape mode, pick a Format: JSON / Java / C#, JavaScript ES2015+, CSS, HTML Hex, HTML Decimal, Python or Rust.
  3. Paste text into Input and read the result in Output.
  4. Check the Characters and Non-ASCII counts in the stats bar.
  5. Press Copy to grab the output, or Reset to clear the input.

03Worked examples

Input: Café 👋 (Escape, JavaScript ES2015+)
Result: Caf\u00E9 \u{1F44B}
Astral characters get the braced form.
Input: Café 👋 (Escape, JSON / Java / C#)
Result: Caf\u00E9 \uD83D\uDC4B
The emoji becomes a UTF-16 surrogate pair.
Input: Café 👋 (Escape, Python)
Result: Caf\u00E9 \U0001F44B
Input: Café 👋 (Escape, HTML Decimal)
Result: Café 👋
Input: C:\path plus a newline (Escape, JavaScript ES2015+)
Result: C:\u005Cpath\u000A
The backslash and newline are both escaped.
Input: Café 👋 \u{2615} (Unescape)
Result: Café 👋 ☕
Mixed styles decode in a single pass.

04Common use cases

  • Putting an emoji or arrow into a CSS content property for a ::before icon
  • Keeping Java or C# source pure ASCII for an old build tool while still storing accented strings
  • Writing a JSON fixture by hand that must contain an emoji as a surrogate pair
  • Decoding &#x...; and &#...; entities copied from scraped HTML back into readable text
  • Finding a stray non-breaking space or zero-width space that makes two strings compare unequal
  • Turning Python \U0001F600 style escapes from a log line back into the real character

05Tips

  • Escaping also converts newlines to \u000A, so the output is one line you can drop inside a string literal.
  • Do not use the JavaScript format for JSON or Java. The braced \u{...} form is a syntax error there, so pick JSON / Java / C#.
  • In Unescape mode, a backslash before hex letters is read as a CSS escape. Paths like C:\cafe get mangled, so escape the backslash first.
  • CSS output ends each escape with a space. When the next character is also a space you will see two, and both are needed.

06Related concepts

Unicode code points, Escape sequences, HTML entities, Surrogate pairs, UTF-16.

Frequently Asked Questions

What is Unicode Escape Tool?

Unicode Escape Tool is a free, browser-based developer tool on AIDToolStack. Escape/unescape Unicode characters It requires no installation or sign-up and works entirely in your browser.

Is Unicode Escape Tool free to use?

Yes. No sign-up, no fees and no usage cap.

Does Unicode Escape Tool store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe