UTF-8 Size Calculator

Byte count of any text in UTF-8, with per character width.

Technology and NetUpdated 2026-10-111 min read
UTF-8 Size Calculator
Up to 10000 characters.
UTF-8 bytes
...
Characters...
Widest char...

What it does

UTF-8 stretches per character: plain ASCII rides 1 byte each while accented Latin takes 2, CJK takes 3, and emoji take 4. Hello with two CJK characters totals 13 bytes across 9 characters with a 3 byte max.

The tool above takes any text and returns byte count with character count and widest width beside it. Surrogate halves and empties reject loudly instead of guessing.

Byte bands follow RFC 3629 with Unicode FAQ beside it: U+0000 to U+007F in one octet, U+0080 to U+07FF in two, U+0800 to U+FFFF in three, the rest in four. ASCII text is valid UTF-8 unchanged, and overlongs with surrogates stay illegal.

Counts drive storage, limits, and SMS style budgets. Databases size in bytes while users count characters, so both numbers ship together.

How to use

  1. Paste or type the text.
  2. Read bytes first, characters beside it.
  3. Read widest for the costliest character.
  4. Test emoji separately; they take 4.
  5. Keep inputs under 10000 characters.
  6. Size storage in bytes, UI in characters.

Formula

Bytes per code point: to U+007F 1, to U+07FF 2, to U+FFFF 3, above 4. Total is the sum.
code point
Unicode scalar value per character.
surrogates
U+D800 to U+DFFF halves, never standalone.
overlongs
Non minimal byte forms, always illegal.

BOM EF BB BF is a signature, not content. CESU pairs of 3 byte surrogates are not valid UTF-8.

Worked example

Example: Hello, 世界

Default text with 7 ASCII plus 2 CJK.

  1. ASCII: 7 chars x 1 = 7 bytes.
  2. CJK: 2 chars x 3 = 6 bytes.
  3. Total: 7 + 6 = 13 bytes.
  4. Count: 9 characters.
  5. Widest: 3 bytes (CJK).
  6. Tool shows 13 bytes, 9 characters, 3 bytes max.

Reference table

UTF-8 width bands
RangeBytesExample
U+0000 to U+007F1ABC is 3 bytes
U+0080 to U+07FF2é is C3 A9
U+0800 to U+FFFF3世 is E4 B8 96
U+10000 up4Emoji is F0 9F 98 80
BOM signatureEF BB BFNot content

Limits

  • Counts bytes, not glyphs or graphemes.
  • Combining marks count separately.
  • 10000 character cap per run.
  • Unpaired surrogates rejected.

Common mistakes

  • Sizing storage in characters.
  • Assuming 1 char is 1 byte.
  • Counting BOM as content.
  • Accepting overlong sequences.
  • Splitting surrogate pairs.

Try it yourself

Quick checks. Answers sit tucked under each question.

ABC?

3 bytes, 3 characters, 1 byte max.

é (U+00E9)?

2 bytes, 1 character.

Emoji U+1F600?

4 bytes, 1 character.

Questions

Default size?

13 bytes across 9 characters.

CJK width?

3 bytes each.

Emoji width?

4 bytes each.

Endianness?

None: UTF-8 is byte ordered.

ASCII compatible?

Yes: plain ASCII is valid UTF-8 unchanged.

Base64 page versus this?

That re-encodes bytes; this measures them.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.