Back to the blog

Developer

What is really in a string.

See each character's code point, name and UTF-8 bytes, write escapes for your language, normalise text, and find hidden and look-alike characters.

By Updated 4 min read

A developer toolkit reading encoded text in two steps, URL decode then Base64 decode, to give Hello, world!

Two strings that look the same can differ: é stored as one character or as two, a zero-width space in a password, a Cyrillic letter in a domain. The Unicode converter shows what each character is.

Every character, by name.

Open the Unicode converter and paste text, then choose Characters: each one is listed with its code point, its name from Unicode 17.0, its category and script, and its bytes in UTF-8 and UTF-16. The count says how many characters, UTF-8 bytes and UTF-16 units it has (what JavaScript's length counts).

Escapes for your language.

Write text as the escapes JavaScript, JSON and Java use (\u00E9, with a surrogate pair beyond the first 65,536 characters), as Rust and modern JavaScript write them (\u{1F600}), as Python, C, CSS or HTML do, or as UTF-8 bytes. Unicode unescape reads any of them back.

Hidden and look-alike characters.

Zero-width spaces and joiners, bidi controls that can make code read differently from how it runs (Trojan Source), and tag characters cannot be seen; they are marked, and Take out hidden characters removes them while keeping the joiners inside emoji. Characters Unicode lists as easily taken for another are marked with what they pass for, and text that mixes scripts is named.

Normalise to NFC, NFD, NFKC or NFKD so text that looks the same compares the same, and write a domain with letters beyond ASCII as DNS keeps it, by the rules browsers follow (UTS #46).

Nothing leaves your browser.

Everything is worked out on your device: what you paste or open is never sent anywhere, and nothing is kept when you leave. A share link carries what you typed after the #, which browsers never send to a server.

Further reading

Topics: unicode converter · code point · utf-8 bytes · unicode escape · zero width space · homoglyph · unicode normalization · punycode

A little less theory. A little more doing.

Try it on your own terms, with a free browser tool.

Try the tool