Skip to content

Choose your path

Built around the job you need to finish

Measure UTF-16 units, Unicode scalars, grapheme clusters and UTF-8 bytes; compare optional normalized copies and a user-selected budget without truncation.

Application developer

Measure storage or transport size without confusing bytes with characters.

Analyze A + emoji + decomposed accent, compare UTF-8 and UTF-16 budgets and inspect exact offsets.

Sees 8 bytes, 5 UTF-16 units, 4 scalars and 3 graphemes with a unit-specific budget verdict.

Localization reviewer

Explain normalization and combining sequences.

Compare original, NFC and NFD copies while keeping source metrics visible.

Normalized offsets are distinguished from original source and no input is silently rewritten.

Mobile import auditor

Retain BOM, CRLF and a complete long-string measurement record.

Import UTF-8, inspect 220 units with pagination, export JSON and restore an earlier run.

Preview limits do not discard units and a newer unsaved draft remains recoverable.

Was this tool helpful?

Reference & details

How it works

Measurement basis

UTF-8 encoding uses TextEncoder; graphemes use runtime Intl.Segmenter. Source byte totals do not add a BOM or protocol framing.

Source versus analyzed copy

Optional canonical normalization affects analyzed metrics only. Source metrics remain original; table ranges are zero-based UTF-16 indices in the analyzed copy.

Limits and recovery

Source is bounded to 100,000 UTF-16 units, report to 4,000,000, and worker runtime to 10 seconds. Errors refuse partial reports; export needed results before leaving.

Updated: August 2026

Example Scenarios

Measure storage or transport size without confusing bytes with characters. Analyze A + emoji + decomposed accent, compare UTF-8 and UTF-16 budgets and inspect exact offsets.

Explain normalization and combining sequences. Compare original, NFC and NFD copies while keeping source metrics visible.

Retain BOM, CRLF and a complete long-string measurement record. Import UTF-8, inspect 220 units with pagination, export JSON and restore an earlier run.

Common Mistakes to Avoid

Treating bytes as characters

Choose the unit used by the actual destination; do not infer social or database limits from a generic character count.

Mixing source and normalized offsets

Use the indicated analyzed-copy offsets and retain the original file.

FAQ

JavaScript code units, Unicode scalars, grapheme clusters and UTF-8 bytes count different things. A😀e plus a combining accent has 5 units, 4 scalars, 3 graphemes and 8 bytes.

No. NFC or NFD applies to an analyzed copy. Original source metrics remain visible; review offsets refer to the analyzed copy.

No. Enter your own whole-number budget and select its unit. Blank means no budget; zero is a real limit. The tool never truncates text.

Native UTF-8 import retains them. A leading BOM can be removed explicitly; editing a textarea may normalize line endings.

Yes. JSON contains every row and method. The on-page review is limited to the first 200 rows in pages of 20.

About String Length Calculator

Measure UTF-16 units, Unicode scalars, grapheme clusters and UTF-8 bytes, inspect exact offsets and check an optional length budget.