Skip to content

Text Length Counter

Measure text length in characters, words, bytes and lines at once.

0

Visible characters

0

UTF-8 bytes

0

UTF-16 units

Quick Tool Overview

The Text Length Counter measures a string every way a computer might: visible characters, Unicode code points, UTF-16 units as JavaScript counts them, UTF-8 bytes, words and lines. When those numbers disagree — and with emoji or accented text they always do — the gap is what breaks a database insert or an API limit.

What it does
Measures text in characters, code points, bytes, words and lines
You give it
A field value, URL, title or whole document
You get back
Six length measurements side by side
Best for
Database columns, API payload limits and encoding checks
Text Tools Free, unlimited use No sign-up Runs in your browser

About the Text Length Counter

"How long is this?" has more than one answer, and the one you need depends on what is doing the measuring. A VARCHAR(255) column counts bytes in some databases and characters in others. A JavaScript string length counts UTF-16 code units. A person counts words. This tool reports all of them side by side so you can stop guessing.

You get the character count as a reader would count it, the UTF-16 length that String.length returns in JavaScript, the number of Unicode code points, the UTF-8 byte size, plus words and lines. When those numbers disagree — and with emoji or accented text they will — the gap is exactly the thing that breaks a database insert or an API payload limit.

Key features of the Text Length Counter

UTF-8 byte size

The figure storage systems and payload limits actually use, where an accent costs two bytes and an emoji four.

The JavaScript length

UTF-16 code units, which is what String.length returns — and why an emoji counts as two in a browser.

Visible characters

Grapheme clusters, so a flag or a skin-toned emoji counts as the single character a reader sees.

Limit testing

Enter a cap and the tool says whether the text fits under each measurement, not just the one you thought of.

Explains the differences

Where two figures disagree, the reason is named, so you know which limit you are actually up against.

How to use the Text Length Counter

  1. 1

    Paste the string

    A field value, a URL, a product title or a whole document.

  2. 2

    Compare the measurements

    Characters, code points, UTF-16 units, UTF-8 bytes, words and lines are reported together.

  3. 3

    Pick the one your system uses

    Databases usually mean bytes, JavaScript means UTF-16 units, and people mean visible characters.

  4. 4

    Test against a limit

    Enter your limit and the tool tells you whether the text fits under each measurement.

Frequently asked questions

UTF-8 uses one byte for plain ASCII but two, three or four for anything else. An accented letter takes two bytes, most CJK characters take three, and emoji take four, so any non-English text is longer in bytes than in characters.

Reviews of the Text Length Counter

What people who use the Text Length Counter think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Text Length Counter. It takes half a minute and no account.

Write the first review

More text tools