Skip to content

Unicode Encoder / Decoder

Convert text to explicit Unicode code points or rebuild text from U+ and JavaScript-style scalar notation without splitting supplementary characters.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Choose text-to-code-points and paste the exact Unicode string, including invisible characters.
  2. 2.Convert and inspect each U+ token; supplementary characters remain one scalar value.
  3. 3.For decoding, enter prefixed U+XXXX or \u{...} tokens separated by spaces, commas or line breaks.

About Unicode Encoder / Decoder

Unicode Encoder / Decoder converts text into a sequence of Unicode code point labels and converts validated labels back into text. It is designed for inspecting characters, debugging copied strings and understanding why one visible symbol can contain several code points. The conversion runs locally in the browser.

Encode mode iterates Unicode code points rather than JavaScript UTF-16 code units. Basic characters receive at least four hexadecimal digits, such as A becoming U+0041. Supplementary-plane characters keep their full value, so πŸ˜€ becomes U+1F600 instead of being exposed as two surrogate halves.

Decode mode accepts tokens beginning with U+ or JavaScript-style backslash-u notation, including brace notation for supplementary values. Tokens may be separated by spaces, commas or line breaks. Hexadecimal is case-insensitive, while output text is constructed only after every token passes scalar-value validation.

Valid Unicode scalar values range from U+0000 through U+10FFFF except U+D800 through U+DFFF. That excluded interval is reserved for UTF-16 surrogate code units and does not identify standalone characters. The tool rejects surrogates, out-of-range numbers, missing prefixes and non-hexadecimal tokens instead of silently replacing them.

A code point is not necessarily a user-perceived character. The emoji πŸ‘©β€πŸ’» contains U+1F469, U+200D and U+1F4BB: woman, zero-width joiner and laptop. Many flags, family emoji, accented forms and writing systems also use sequences. This page displays the scalar sequence and does not claim to segment grapheme clusters.

Unicode code points are also different from UTF-8 bytes. U+00E9 identifies the character Γ©, while its UTF-8 representation is the two bytes C3 A9. Use the related UTF-8 byte converter when a protocol or file format requires byte-level encoding. Use this tool when the question is which abstract characters a string contains.

Normalization is intentionally not performed. Precomposed Γ© may be U+00E9, while an equivalent-looking decomposed form may be U+0065 U+0301. Both are valid and can render alike, but they remain different sequences here. That exactness helps diagnose search, identifier, filename and comparison problems.

Control characters and default-ignorable code points are included. A newline encodes as U+000A, and a zero-width joiner appears explicitly as U+200D. Revealing these values can explain unexpected cursor movement, invisible differences or why text pasted from another source fails an exact comparison.

The tool limits input to 100,000 code points to keep rendering and copying responsive. It does not look up character names, scripts, confusable status or language meaning, and it does not validate whether a sequence forms a recommended emoji or orthographic cluster. Those are separate Unicode properties beyond reversible scalar conversion.

Eight standards-backed fixtures cover ASCII, Latin accents, CJK, supplementary emoji, mixed basic and supplementary text, a musical symbol, newline and a joined emoji sequence. Tests assert both directions and separately reject surrogate and out-of-range values. This avoids the common self-consistency trap where a wrong surrogate convention round-trips with itself.

Use encode mode to paste the exact text you want to inspect, then copy the U+ sequence. Use decode mode when documentation, logs or source code provide scalar tokens. Preserve prefixes and token boundaries, especially when adjacent values could otherwise be mistaken for one longer hexadecimal number.

The output is a diagnostic representation, not encryption or escaping for every programming language. HTML entities, JSON escapes, URL encoding and UTF-8 bytes have different syntax and rules. Choose the representation required by the consuming system and keep code point inspection as the ground truth for character identity.

Methodology & sources

Text is iterated by Unicode scalar value and formatted as uppercase U+ hexadecimal with a four-digit minimum. Decode mode validates the scalar range and surrogate exclusion before calling the platform code-point constructor.

Frequently asked questions

Encoding & Crypto guides

View all