Unicode encoder & decoder
Convert between JavaScript escapes, HTML hex/decimal entities, U+ notation, UTF-8 bytes and a per-character inspection table, with ASCII passthrough and NFC/NFD normalization — all local.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Encode modes take plain text; decode modes accept \u, \u{}, \x, U+, &#x..;, &#..; and common named entities.
Converted output
The inspection table shows one character per line with code point, decimal value, UTF-8 bytes and JS escape.
Enter text or an encoded string to see the result
What this tool does
- Turn Chinese (or any text) into \u escapes or HTML entities for code, JSON configs and page source
- Decode \u, &#x..; and U+ notation back to readable text when hunting down encoding bugs
- Inspect code point, UTF-8 bytes and UTF-16 length per character to spot surrogate pairs and combining marks
Example
Input
中文
Output
\u4e2d\u6587
JavaScript escape mode: 中 is U+4E2D and 文 is U+6587. Non-BMP characters such as emoji are emitted as surrogate pairs (\ud83d\ude00), valid inside JS strings.
Frequently asked questions
Which formats are supported?
Encoding: JS escapes (\u4e2d), HTML hex entities (中), HTML decimal entities (中), U+ notation (U+4E2D), UTF-8 bytes (E4 B8 AD) and an inspection table. Decoding: \u / \u{} / \x / U+ as one group, HTML entities as another, and an auto mode that handles both at once.
Why is there no character-name lookup?
Character names come from the official UCD NamesList.txt (2MB+). Since that authoritative dataset is not bundled here, the inspection table sticks to facts it can compute: code point, decimal value, UTF-8 bytes and the JavaScript escape.
What does NFC / NFD normalization do?
A glyph can be written in composed or decomposed form (é = U+00E9 or e + U+0301). NFC merges, NFD splits, which changes code point and UTF-8 byte counts. Normalizing first is common before comparing or de-duplicating text.
What is ASCII passthrough for?
When enabled, letters, digits and common punctuation stay unchanged in encode modes and only non-ASCII characters are encoded, which keeps output readable. Disable it to encode every character.
Keywords:unicode converterunicode escapeoffline