Unicode Converter
Convert text to \\uXXXX escapes, HTML entities or UTF-8 hex and back.
How to use it
- Pick a direction: text to or from
\\uXXXX, HTML entities, or UTF-8 byte hex. - Paste your text or the escaped form into the left panel; the conversion runs as you type.
- In
\\uXXXXoutput, code points above U+FFFF appear as a surrogate pair, matching what most runtimes expect. - HTML entities use the full code point form (
😀) and also decode decimal🚀references. - Copy the result or clear the panels; use Sample to see mixed-script text in all three forms.
Common use cases
- Source code literals — produce
\\uXXXXescapes for string literals when an editor or protocol mangles non-ASCII text. - HTML safety — encode non-ASCII characters as numeric entities for templates that must stay pure ASCII.
- Wire debugging — read the exact UTF-8 bytes a client sent, or rebuild text from a byte dump.
- Round-trip checks — verify that escaping and unescaping preserve a string exactly.
Why it stays private
All six directions are pure string and byte operations in your browser. Text with names, keys or confidential content never leaves the page.
FAQ
Q: Why do emoji become two \uXXXX escapes?
A: The \\uXXXX form can only express 16-bit code units, so characters above U+FFFF are written as a UTF-16 surrogate pair — the same representation JavaScript strings use internally.
Q: Why is plain ASCII left alone when encoding? A: Printable ASCII is identical in all three forms, so keeping it readable makes the output easier to diff and review.
Q: What happens with invalid input? A: Invalid hex, out-of-range entities and byte sequences that are not valid UTF-8 all produce a clear error instead of silently producing replacement characters.
Your data stays on this device
Unicode Converter runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.