Unicode Encoder/Decoder
Encode text to \uXXXX Unicode escape sequences or decode escapes back to text.
ToolsSoup's Unicode Encoder/Decoder is a free online tool that converts any text into \uXXXX Unicode escape sequences and turns those escapes back into readable characters, instantly and entirely in your browser. It is perfect for embedding non-ASCII characters, emoji, and accented letters safely inside JSON, JavaScript, Java, or C source code — with no uploads, no sign-up, and nothing ever leaving your device.
What is a Unicode escape sequence?
A Unicode escape sequence is a way of writing a character using only plain ASCII. The most common form is \uXXXX, where XXXX is the four-digit hexadecimal code of a UTF-16 code unit — for example, the letter A is \u0041 and é is \u00e9. Languages such as JavaScript, JSON, Java, and C# read these escapes and replace them with the real character. The decoder here also understands the ES6 \u{...} form for code points above U+FFFF and the \xXX form for bytes below 256.
How to encode and decode Unicode online
Converting text with ToolsSoup takes just a few seconds:
- Type or paste your text or \uXXXX escapes into the input box.
- Click Encode to turn every character into a \uXXXX escape, or Decode to turn escapes back into plain characters.
- Copy the result with one click and paste it straight into your code, JSON file, or config.
When should you use Unicode escapes?
Unicode escapes are useful any time a file, protocol, or toolchain only handles ASCII reliably. Embedding \uXXXX in a string keeps source files pure ASCII so they survive any encoding, makes invisible or look-alike characters obvious in code review, and avoids mojibake when a system mishandles UTF-8. They are also handy for spotting hidden characters such as zero-width spaces that copy-paste sometimes introduces.
Why use this Unicode encoder?
- 100% free with no ads, sign-up, or usage limits.
- Runs entirely in your browser — your text is never uploaded to a server.
- Encodes every character to the standard \uXXXX format used by JSON and JavaScript.
- Decodes \uXXXX, ES6 \u{...}, and \xXX escapes, including emoji and astral characters.
- Works offline once the page has loaded.
Frequently asked questions
Is this Unicode encoder free?
Yes. Every tool on ToolsSoup is completely free to use, with no account, sign-up, or hidden limits.
Is my data safe?
Absolutely. All encoding and decoding happens locally in your browser using JavaScript, so your text is never sent to or stored on any server.
What format does the encoder produce?
It outputs the \uXXXX form, where each character becomes a backslash, the letter u, and a four-digit lowercase hexadecimal code. This is the exact escape syntax accepted in JSON, JavaScript, Java, and C# string literals.
Does it handle emoji and characters above U+FFFF?
Yes. On encode, characters outside the Basic Multilingual Plane are written as a UTF-16 surrogate pair of two \uXXXX escapes, which is exactly what JavaScript and JSON expect. On decode, the tool also accepts the ES6 \u{...} form that writes such characters as a single code point.
What is the difference between Unicode escaping and URL or HTML encoding?
Unicode escaping rewrites characters as \uXXXX so they are safe inside source code and string literals. URL encoding uses percent-escapes like %20 for use in URLs, and HTML encoding uses entities like < for use inside HTML. Pick the one that matches where the text will appear.