Skip to main content

Unicode Escape Converter — Text ⇄ \uXXXX, \u{}, HTML, CSS

Text ⇄ Unicode escapes — \uXXXX, \u{1F600}, 😀, CSS \1F600 — emoji + CJK done right, browser-only

  • Runs locally
  • Category Encoding & Crypto
  • Best for Checking small payloads, tokens, hashes, and encoded values quickly.
Style
Escape
Case
Input
Output
Output appears here.

What this tool does

Convert text to Unicode escape sequences and back, both ways, right in your browser. Encode in the style you actually need: JavaScript/JSON \uXXXX (with proper surrogate pairs for emoji), ES6 code-point braces \u{1F600}, HTML decimal entities 😀, HTML hex entities 😀, or CSS escapes \1F600. Choose to escape only non-ASCII characters and leave plain English alone, or escape every character, and pick upper or lower-case hex. The decoder is the forgiving half: paste a messy blob that mixes \uXXXX, \u{...}, &#...;, &#x...;, \xHH and CSS escapes all at once and it reassembles the original text, rejoining surrogate pairs into a single emoji. Everything iterates by code point, so Chinese, Japanese, Korean and astral-plane emoji round-trip exactly instead of breaking into half-characters. 100% client-side, instant output, one-click copy, and a shareable URL that reopens the same conversion. Nothing is uploaded.

Tool details

Input
Text + Numbers
The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
Output
Live result + Copy
The result area focuses on usable output, with copy, download, or preview actions when supported.
Privacy
Browser-side processing
The main tool logic does not call an external API, so inputs normally stay in the current tab.
Save / share
Shareable URL state
Key settings are encoded in the URL so another person can reopen the same setup.
Performance budget
Initial JS <= 9 KB
No WASM budget is declared, keeping the tool quick to open on mobile.
Best fit
Encoding & Crypto · Developer
Category and role tags drive related tools, internal links, and quick fit checks.

How to use

  1. 1. Input

    Paste or drop your content into the tool panel.

  2. 2. Process

    Click the button. All processing is local in your browser.

  3. 3. Copy / Download

    Copy the result or download to disk in one click.

How Unicode Escape Converter fits into your work

Use it for quick browser-side encoding, decoding, hashing, token checks, and share-safe transformations.

Encoding jobs

  • Checking small payloads, tokens, hashes, and encoded values quickly.
  • Preparing values for APIs, URLs, docs, or support tickets.
  • Avoiding account-based tools when the input might be sensitive.

Encoding checks

  • Do not paste live secrets unless you are comfortable with local browser handling.
  • Confirm whether the operation is reversible before sharing the result.
  • For hashes, compare the exact algorithm and casing expected by the receiver.

Good next steps

These links move the current task into a more complete workflow.

  1. 1 Text to Hex Converter Text ⇄ hexadecimal by UTF-8 bytes — Chinese and emoji safe, picks your separator and case, decodes messy pasted hex — runs in your browser Open
  2. 2 Unicode Character Inspector Inspect any text character-by-character: code points, UTF-8/UTF-16 bytes, HTML entities, JS escapes, names, and hidden zero-width / confusable glyphs. Open
  3. 3 HTML Entities Encoder Encode/decode HTML entities — &amp; &lt; &gt; &quot; &#39; and all numeric refs — browser-only Open

Real-world use cases

  • Read a \u-escaped string out of a log or JSON dump

    A server logged a user's name as "张伟" and you cannot tell who it is. Paste it into the decode side and it resolves to 张伟 instantly. The same trick works on JSON API responses that escape every non-ASCII character — drop the whole blob in, get readable text back, and stop squinting at hex.

  • Embed non-ASCII safely in a JavaScript or JSON file

    You need to ship a label like "日本語" but the build pipeline mangles raw UTF-8 in some legacy step. Encode it to 日本語 in the JS/JSON style and paste that into the source — it survives any ASCII-only transport and renders identically. Switch to escape- everything if even the ASCII has to be hidden.

  • Write an emoji into CSS or an HTML template correctly

    You want a 🎉 in a CSS content property or an HTML page and the raw character keeps getting re-encoded by your editor. Encode 🎉 to the CSS escape \1f389 for the stylesheet, or to the HTML entity &#127881; for the markup, and paste the escape instead of the character so it renders the same everywhere.

  • Debug why an emoji shows up as two pieces

    Your code prints 😀 where you expected one emoji. Paste that surrogate pair into the decoder and confirm it is 😀, then re-encode in ES6 style to get the single-token \u{1f600} your modern runtime can read. Seeing the pair join back proves the bytes were fine and the display was the only problem.

Common pitfalls

  • Iterating by character index instead of code point. charCodeAt and string[i] return a single UTF-16 unit, so an emoji gets cut in half and you escape two broken surrogates. This tool walks by code point, but if you write your own escaper, use codePointAt and for…of so 😀 stays one character.

  • Using a bare \uXXXX for a character above U+FFFF. ὠ0 is not 😀 — it is ὠ followed by a literal 0, because \uXXXX only reads four digits. For astral characters use the surrogate pair 😀 or the ES6 form \u{1f600} instead.

  • Pasting an HTML entity into JavaScript or a \u escape into HTML. &#128512; stays literal text in a JS string, and \u{1f600} stays literal text in HTML. Match the escape style to where it lives. Use \u for JS/JSON, &#…; for HTML, \1f600 for CSS.

Privacy

Every conversion runs as plain JavaScript inside your browser tab. The text you encode or decode never leaves the page and is never logged. The one thing to know: the shareable URL puts your input in the query string, so a link pasted into chat records that text in the recipient server's access log. If you are escaping something sensitive, use the copy button and paste the result rather than sharing the link.

FAQ

Tool combos

Folks in your role tend to reach for these alongside this tool.

Made by Toolora · 100% client-side · Updated 2026-06-13