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

Input workspace

Runs on your device

OUTPUT WORKSPACE

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.

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.