Keyframes Animation Generator
Build CSS keyframe animations and watch them run as you edit.
Measure text in UTF-8 bytes, code points, UTF-16 units and graphemes.
The String Byte Counter measures a string four ways at once — UTF-8 bytes, code points, UTF-16 units and graphemes — because using the wrong one of those is a real and common source of bugs.
Four different numbers can all reasonably be called "the length" of a string, and using the wrong one causes real bugs. This counts all four: UTF-8 bytes, Unicode code points, UTF-16 units — which is what JavaScript's .length returns — and graphemes, which is what a reader calls characters.
The gaps between them are where things break. A VARCHAR(255) counts bytes in some databases and characters in others. A DynamoDB key limit counts bytes. A JavaScript length check counts UTF-16 units, so one emoji counts as two. A Twitter-style limit counts graphemes, so an emoji with a skin tone counts as one despite being four code points. The breakdown shows how many characters take one, two, three and four bytes, so you can see exactly where the size is going.
UTF-8 bytes, code points, UTF-16 units and graphemes — the four things that all get called "length" and are all different.
How many characters take one, two, three and four bytes, so an oversized field has an obvious explanation.
Uses the browser's own segmenter, so an emoji with a skin tone counts as one character rather than four.
Set a byte or character limit and see the headroom, which is the actual question behind most visits.
Every count updates on each keystroke, so trimming a value to fit is immediate.
Any string — a field value, a message, a key.
UTF-8 bytes, code points, UTF-16 units and graphemes, side by side.
How many characters take one, two, three or four bytes each.
Set a byte or character limit and see how much headroom is left.
It depends. MySQL VARCHAR(255) counts characters, but the index key length is in bytes — which is why a utf8mb4 column can exceed an index limit. PostgreSQL varchar counts characters. Check both.
Because .length counts UTF-16 units, and any code point above U+FFFF takes two of them. Use [...string].length for code points, or Intl.Segmenter for graphemes.
What a reader calls a character. An emoji with a skin tone modifier is one grapheme, two code points and eight UTF-8 bytes — and a flag emoji is one grapheme made of two.
One for ASCII, two for most Latin, Greek, Cyrillic, Hebrew and Arabic, three for most CJK and Indic scripts, and four for emoji and rarer scripts.
What people who use the String Byte Counter think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the String Byte Counter. It takes half a minute and no account.
Write the first reviewBuild CSS keyframe animations and watch them run as you edit.
Convert between bytes, KiB, MB, GB and bits, in both systems.
Find what runs on a port, with a note on whether it should be exposed.
Render Markdown to clean HTML, with tables, task lists and fenced code.
The full ASCII table with decimal, hex, octal, binary and HTML entities.
Stack CSS filters on a real image and copy the declaration.
Build soft extruded UI with paired light and dark shadows.
Encode and decode quoted-printable, the MIME encoding in every email header.