# String Byte Size Calculator

> Measure text in UTF-8, UTF-16 and UTF-32 bytes, code points and grapheme clusters.

The size of a string depends on the encoding. This tool reports UTF-8, UTF-16 and UTF-32 byte counts alongside JavaScript's string length, the Unicode code point count and the number of grapheme clusters — the last being what a person actually calls a character.

**URL:** https://convertto.tech/t/string-byte-counter
**Category:** Text Tools (https://convertto.tech/c/text-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **Privacy:** Runs entirely in your browser — nothing is uploaded
- **Cost:** Free, unlimited, no sign-up

## How to use

1. Enter or paste your text.
2. The result appears immediately — copy or download it.

## FAQ

### Why is my emoji counted as two characters?

JavaScript measures strings in UTF-16 units, and any character above U+FFFF — which includes almost all emoji — needs two of them. Use the grapheme cluster count for the number a person would give.

### Which number does my database column limit use?

Usually UTF-8 bytes. A VARCHAR(255) in MySQL with utf8mb4 holds 255 characters but can consume up to 1,020 bytes, so a byte-limited column fills up sooner than the character count suggests.

## Related tools

- [Unicode Converter](https://convertto.tech/t/unicode-converter): Convert text between code points, UTF-8, UTF-16, HTML entities and escape sequences.
- [UTF-8 Byte Inspector](https://convertto.tech/t/utf8-inspector): See exactly how text is encoded — code points, UTF-8 bytes, names and byte counts per character.
- [Hex to Text Converter](https://convertto.tech/t/hex-to-text): Convert text to hexadecimal bytes and decode hex strings back into readable text.
- [Unicode Escape Converter](https://convertto.tech/t/unicode-escape): Convert characters to \u escape sequences and back — for JSON, JavaScript and source code.
- [Edge Case Test String Generator](https://convertto.tech/t/edge-case-string-generator): Generate the strings that break input handling — Unicode, RTL, emoji, injection patterns and boundary lengths.
- [Fancy Text Generator](https://convertto.tech/t/fancy-text-generator): Convert text into bold, italic, script, monospace and double-struck Unicode styles.
- [Glitch Text Generator](https://convertto.tech/t/glitch-text-generator): Create corrupted Zalgo-style glitch text using stacked Unicode combining marks.
- [Text Cleaner](https://convertto.tech/t/text-cleaner): Strip smart quotes, invisible characters, ligatures and stray whitespace pasted from Word or a PDF.
