Unicode Decode
Turn \uXXXX escape sequences back into normal text.
What is Unicode Decode
Unicode decoding converts \uXXXX escape sequences back into their corresponding characters.
🔒 Everything runs in your browser. Nothing is uploaded.
What this tool actually does with your file
- Where it runs
- In your browser, on this page
- Upload
- None — the file never leaves your device
- Offline
- Works with the network disconnected
Only one escape syntax is recognised
This decoder handles \uXXXX and the surrogate pairs built from them. It does not interpret \x41 (a byte), \U0001F600 (Python's eight-digit form), \N{...}, HTML entities like 中 or CSS escapes like \4E2D. Feeding it the wrong family leaves the text unchanged, which looks like the tool did nothing.
The reverse case is more subtle: a backslash that is meant literally. The sequence \\u4e2d in a JSON source is an escaped backslash followed by the four characters u4e2d, not an escape at all. A decoder that scans for \u without respecting the preceding backslash turns that into the wrong character.
Lone surrogates survive and then break things
A high surrogate without its low partner (� followed by anything other than �–�) is not a valid character. JavaScript will happily hold it in a string, print a replacement box, and then throw when you try to encode it as UTF-8 for storage or a network call. If the decoded output shows boxes only in some places, look for an orphaned half of a pair.
The practical symptom is a database insert failing with an encoding error on text that displays fine in the browser. Validate that every surrogate has a partner before persisting; the fix is usually to drop or replace the orphan rather than to guess the missing half.
Mixed content needs care
Real payloads mix escaped and unescaped text freely — a log line with escaped user input inside a plain message, for example. Decoding the whole line is correct, but re-encoding it will not reproduce the original exactly, because the encoder has no way to know which parts were originally escaped.
So treat decoding as one-way when the exact bytes matter: keep the source around if you may need to diff, sign or re-transmit it. Round-tripping through an escape format is only guaranteed lossless when the whole string was produced by the same encoder.
How to use it
- 1.Enter \uXXXX string
- 2.Decode
- 3.View result
How Unicode Decode works under the hood
Encoding tools convert between representations of the same bytes: Base64, percent-encoding, hex, HTML entities, Unicode escapes. A correct encoder is reversible; a lossy one silently changes the data.
- 1
Get the exact bytes
Text is encoded to UTF-8 bytes with TextEncoder first; binary input is read as an ArrayBuffer. Encoding the wrong byte sequence is the most common cause of a wrong result.
- 2
Apply the encoding rule
Each format has an exact specification: Base64 uses a 64-symbol alphabet with padding, percent-encoding escapes reserved characters as UTF-8 bytes.
- 3
Decode back to verify
Round-tripping the output back to the input is the only honest proof that an encoder is correct. The tool keeps the reverse path available on the same page.
Processing pipeline
Base64 is not encryption
Base64 increases size by about a third and hides nothing: anyone can decode it. It exists to carry binary data through text-only channels such as JSON, email headers and data URLs. If you need confidentiality, use encryption with a key, not an encoding.
Where encoders break
Percent-encoding applied twice turns %20 into %2520; Base64 without padding fails strict decoders; UTF-16 input decoded as UTF-8 produces replacement characters that cannot be recovered. When output looks wrong, check the byte sequence before checking the tool.
Verify it yourself
Encoders are pure functions over bytes. Decode the output again and you should get the input back exactly.
- 1.Open DevTools on this page and switch to the Network tab
- 2.Keep the filter on Fetch/XHR and run the tool
- 3.Confirm no request carries your file — you should see only page assets and fonts
Frequently asked questions
What is Unicode decoding?
It turns \u0041 back into the character A.
Is it safe?
Yes, it runs entirely in your browser.
What this kind of conversion cannot keep
Encoding and hashing run through the browser's Web Crypto API or a pure-JavaScript implementation. The output is deterministic: the same input always produces the same digest, so you can verify a result against any other tool.
More in Encoding
On this page
- What is Unicode Decode
- What this tool actually does with your file
- How it actually behaves
- How to use it
- How it works inside
- Frequently asked questions
Excel formula reference
29 functions with syntax, arguments and a table you can retype.
Browse the list →