Code points and UTF-8 bytes
Enter text to see each Unicode scalar value and how it is encoded in UTF-8. Surrogate pairs in JavaScript strings are shown as a single code point where possible.
| Char | Code point | UTF-8 bytes | Length |
|---|---|---|---|
| Enter text above | |||
How UTF-8 and Unicode code points relate
Characters, code points, and bytes
Unicode assigns every character a code point (like U+0041 for A). UTF-8 encodes those code points as one to four bytes so ASCII stays single-byte and the rest of the world’s text still fits. This page shows each character’s code point and UTF-8 hex bytes so encodings become visible instead of mysterious.
Worked example
A is U+0041 and UTF-8 byte 41. é is U+00E9 and UTF-8 C3 A9. An emoji needs four bytes. If a file was decoded as Latin-1 by mistake, those bytes turn into mojibake — comparing hex here helps pin down which encoding was used.
Common mistakes
- Counting UTF-8 bytes as “number of characters.”
- Cutting strings mid-sequence and creating invalid UTF-8.
- Confusing UTF-8 with UTF-16 endianmark files.
FAQs
- Is Base64 Unicode?
- No — Base64 transports bytes. Encode text to UTF-8 first; see Base64.
- Longer primer?
- UTF-8 explained.
When this page helps
Use it when you want a transparent, browser-side calculation with the assumptions spelled out — then verify anything high-stakes against primary docs, a professional, or your own measurements. The related links below point to sibling tools and longer guides when you need more context.
Accuracy notes
Results depend entirely on the numbers you enter and the simplified model described above. Device clocks, tape measurements, market rates, and recipe conventions can all differ from a perfect textbook case. If an output looks surprising, re-check units first, then re-read the formula section.
Related: Character Sets, Base64, Bits & Bytes.
Last updated: July 2026