Text utilities

UTF-8 Byte Counter

Measure how many bytes a text string occupies when encoded as UTF-8.

Text stays in your browserCopy your result
Text workspace
Text workspace

Edit on the left, review and copy the result on the right.

See the method

Your original text

Runs on your device

Your processed text

Your result

Let’s calculate.

Use the Calculate button to see your result.

Your content is processed locally.

How to use this tool

  1. Enter text.
  2. Select Update result to view the result.
  3. Check the method and assumptions below before using the result.

Input reference and sample values

Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.

InputFormat and unitsSample
TextKeep the structure and separators shown in the sample. Line breaks are retained in this input.Hello 🌍

Result for these sample inputs

10 bytes
KiB (1,024 bytes)
0.009765625
kB (1,000 bytes)
0.01

Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.

The method, explained

Encode the text with TextEncoder and count the resulting bytes. Divide by 1,024 for KiB and by 1,000 for kB.

A WORKED EXAMPLE

Hello uses 5 UTF-8 bytes. The globe emoji 🌍 uses 4 bytes, so Hello 🌍 uses 10 bytes including the space.

What to keep in mind

Byte length differs from character count and compressed transfer size. No byte-order mark is included. Browser-normalized line endings may differ from an original file.

Common questions

Does this predict gzip download size?

No. Compression depends on the complete content and compression settings. This measures uncompressed UTF-8 bytes.

Is my content uploaded?

No. This tool processes the text in your browser. Copy only the result you intend to share.

Methodology maintained by ClarityKit. How these tools are built and checked.