← Text & List Tools
Text & List Tools · runs locally

UTF-16 Code Unit Converter

Inspect JavaScript UTF-16 code units as four-digit hexadecimal values or reconstruct strictly valid Unicode text.

Ready. Your working data stays in this browser.

Why this tool is useful

Use this converter to diagnose surrogate pairs, compare browser strings with UTF-16 APIs and prepare exact code-unit test fixtures.

How it works

Encoding prints every 16-bit unit; decoding validates hexadecimal tokens and requires each high surrogate to be followed by one low surrogate.

Practical example

A😀 becomes 0041 D83D DE00, showing the BMP letter and the emoji surrogate pair separately.

Validation

The calculation is deterministic and explains validation errors instead of silently changing invalid input.

Privacy boundary

Input and output remain in this tab. Copy and download happen through browser APIs without a server upload.

Result passport

Every run reports its tool mode, timestamp and input/output size so transformed data can be audited.