Skip to content
Test versionSearch

Developer tools

Unicode scalar codes and byte offsets

Inspect Unicode scalar codes, decimal values, UTF-16/UTF-8 offsets and numeric HTML references. Download the labelled table without executing HTML.

How it worksFAQRelated tools

Content reviewed:

Inspect your own small Unicode sample and calculate. Native exports and report exports are separate; reloading removes temporary scenarios.

Small inspection samples only; malformed surrogates refused. Normalization source/comparison 200 units each, normalized form 800 units and JSON3500 units/report 18 parts; output exceeding bounds refuses. Scalar inspection32scalars/64UTF16 units. Own UTF-8 file up to 8KiB and the tool input bound preserves CRLF/BOM. No grapheme count, Unicode names/database, visual equivalence, confusable/identifier safety or current Unicode 18 conformance claim. Existing larger tools remain available.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

Iterate valid Unicode scalars while accumulating zero-based UTF-16 unit and UTF-8 byte offsets. Encode scalar values as U+ hexadecimal, decimal, UTF-16 units, UTF-8 bytes and numeric HTML references. Small inspection samples only; malformed surrogates refused. Normalization source/comparison 200 units each, normalized form 800 units and JSON3500 units/report 18 parts; output exceeding bounds refuses. Scalar inspection32scalars/64UTF16 units. Own UTF-8 file up to 8KiB and the tool input bound preserves CRLF/BOM. No grapheme count, Unicode names/database, visual equivalence, confusable/identifier safety or current Unicode 18 conformance claim. Existing larger tools remain available.

Worked example

Own fabricated text with Unicode scalars.

About this calculation

The Unicode scalar inspector breaks a short text into its Unicode scalar values and shows how each one is encoded. Developers can use it to debug string lengths, byte positions and HTML references.

For every scalar the table lists the U+ hexadecimal code, the decimal value, zero-based UTF-16 and UTF-8 offsets, the UTF-16 units, the UTF-8 bytes and a numeric HTML reference. The sample Own é 🚀 has 9 UTF-16 units, 8 scalars and 12 UTF-8 bytes, because the accent is a separate combining mark and the rocket needs four bytes. Selected invisible characters such as spaces are noted with their offset.

Inspection is limited to 32 scalars or 64 UTF-16 units, and an uploaded UTF-8 file to 8 KiB. There is no grapheme count, no name database and no claim of visual equivalence.

Frequently asked questions

How do I find the Unicode code point of a character?

Enter a short text sample. The Unicode scalar inspector lists each scalar as U+ hexadecimal and decimal, with its UTF-16 units, UTF-8 bytes and numeric HTML reference.

How many UTF-8 bytes does a character use?

The table shows the UTF-8 bytes for each scalar. In the example, the rocket emoji U+1F680 takes F0 9F 9A 80, four bytes, and two UTF-16 units, D83D DE80.

What are UTF-16 and UTF-8 offsets?

They are zero-based positions accumulated while iterating over the text: the UTF-16 offset counts code units, and the UTF-8 offset counts bytes before each scalar.

How long can the Unicode sample be?

Scalar inspection accepts up to 32 scalars or 64 UTF-16 units. An own UTF-8 file may be up to 8 KiB, keeping its original line endings and BOM.

Does the Unicode inspector count graphemes or show character names?

No. It works with scalars, not grapheme clusters, and has no Unicode name database. Malformed surrogates are refused.

Does the same code mean characters look the same?

Scalars and normalisation do not establish visual equality or safe identifiers. The tool makes no claim about confusables or identifier safety.