Xerobit

Character Counter: Characters, Words, Bytes and Limits

Paste or type text to see the total character count with and without spaces, plus words, sentences, paragraphs, lines and UTF-8 bytes. This character counter runs entirely in your browser so nothing is uploaded. Use it as a textarea character counter for forms or check content against common publishing limits like SEO titles and tweets.

Result

  • Characters (with spaces)
    0
  • Characters (no spaces)
    0
  • Code points
    0

    Differs from characters when emoji or accents use several code points

  • Words
    0
  • Sentences
    0
  • Paragraphs
    0
  • Lines
    0
  • UTF-8 bytes
    0
  • SEO title (60)
    0 / 60

    60 remaining

  • Meta description (160)
    0 / 160

    160 remaining

  • Tweet (280)
    0 / 280

    280 remaining

  • SMS (160)
    0 / 160

    160 remaining

How to use the character counter

  1. Type or paste your text into the textarea field above.
  2. Read the instant counts for characters with spaces, characters without spaces, words, sentences, paragraphs, lines and UTF-8 bytes.
  3. Check the Live limits section to see remaining characters for SEO titles, meta descriptions, tweets and SMS messages.
  4. Edit your text until every metric fits your target platform.

What this character counter measures

A reliable character counter must distinguish between several metrics that writers and developers often confuse. This tool reports each one separately so you can use it as a precise text field character counter for forms, APIs or CMS fields.

  • Characters with spaces: Every visible character (grapheme) in the string, including spaces, tabs and newlines. An emoji, a flag or a letter with an accent counts once, however many code points it uses. A separate Code points row matches Python's len(text).
  • Characters without spaces: The same count minus all Unicode whitespace characters. This is what many people mean when they search for a character and space counter that separates the two values.
  • Words: Sequences of non-whitespace characters separated by spaces or line breaks.
  • Sentences: Blocks of text ending with a period, exclamation mark, question mark or newline.
  • Paragraphs: Groups of lines separated by one or more blank lines.
  • Lines: Segments split by newline characters. A single block of text with no line breaks counts as one line.
  • UTF-8 bytes: The storage size when encoded as UTF-8. ASCII characters use 1 byte, accented Latin letters typically use 2, and emoji use 4.

Common publishing limits at a glance

When you use this tool as a textarea character counter for web content, these are the thresholds you will check most often. The live limits section below the main counts shows exactly how many characters remain for each one.

ContextRecommended limitNotes
SEO title tag60 charactersSearch engines truncate longer titles in results.
Meta description160 charactersKeeps the full snippet visible on desktop search.
Tweet280 charactersURLs count as 23 characters regardless of actual length, and some characters count as two. For dedicated analysis, see the twitter character counter.
SMS (GSM-7)160 charactersUnicode SMS drops to 70 per segment. Use the sms character counter for encoding details.
Instagram caption2,200 charactersOnly the first 125 show before truncation. See the instagram character counter.

How UTF-8 byte counting works

The total character counter value and the byte count diverge as soon as your text contains non-ASCII characters. UTF-8 encodes each Unicode code point using one to four bytes according to its numeric value.

For example, the word Café has 4 characters but 5 UTF-8 bytes because the letter é (U+00E9) encodes as two bytes: 0xC3 0xA9. The globe emoji 🌍 (U+1F30D) sits outside the Basic Multilingual Plane and requires four bytes: 0xF0 0x9F 0x8C 0x8D.

This calculator determines byte length by iterating through each code point. Values up to 127 take 1 byte, up to 2047 take 2 bytes, up to 65535 take 3 bytes, and anything higher takes 4 bytes. Databases, file systems and network protocols care about byte length, not grapheme count, which is why this metric matters alongside the standard character count.

Graphemes versus code points

JavaScript's native String.prototype.length counts UTF-16 code units, not visible characters. A single emoji like 🌍 returns 2 under .length because it is stored as a surrogate pair.

Some visible characters, called grapheme clusters, consist of several code points joined by zero-width joiners or combining marks. A family emoji built from several people and joiners is seven code points but one grapheme, and e followed by a combining accent is two code points but one character. This tool counts graphemes with the browser's Intl.Segmenter for the Characters rows, and shows the code point count in its own row, which equals Python 3's len(). If a browser has no Intl.Segmenter, the tool falls back to code points.

Limits set by software can use yet another unit: an HTML maxlength counts UTF-16 units, a database column may count code points or bytes, and X weights some characters such as CJK and emoji as two. Check the unit your target uses.

Using the tool as a text field character counter

Developers building forms often need a text field character counter that updates on every keystroke. While this page is designed for manual checking, the logic mirrors what you would implement in a front-end component. Attach an input event listener to your <textarea> or <input>, read event.target.value, and use Intl.Segmenter for visible characters, the spread length for code points, or iterate for bytes.

Remember to account for how your backend stores the data. If your database column is defined as VARCHAR(255), it usually limits characters, but a BYTEA or older MySQL VARCHAR with a byte-length charset limits bytes instead. Checking both the character and space counter values and the UTF-8 byte count prevents silent truncation errors when users paste accented text or emoji into your forms.

Worked examples

ExampleInputResult
SEO meta descriptionText: Learn how to use this free character counter to measure text length, count words and verify UTF-8 byte size for any project.Characters (with spaces): 124; Characters (no spaces): 103; Code points: 124; Words: 22; Sentences: 1; Paragraphs: 1; Lines: 1; UTF-8 bytes: 124; SEO title (60): 124 / 60; Meta description (160): 124 / 160; Tweet (280): 124 / 280; SMS (160): 124 / 160
Short paragraphText: The quick brown fox jumps over the lazy dog. It was a sunny day. / Another paragraph starts here.Characters (with spaces): 96; Characters (no spaces): 78; Code points: 96; Words: 18; Sentences: 3; Paragraphs: 2; Lines: 3; UTF-8 bytes: 96; SEO title (60): 96 / 60; Meta description (160): 96 / 160; Tweet (280): 96 / 280; SMS (160): 96 / 160
Unicode textText: Hello 🌍! Café résumé naïve.Characters (with spaces): 27; Characters (no spaces): 23; Code points: 27; Words: 5; Sentences: 2; Paragraphs: 1; Lines: 1; UTF-8 bytes: 34; SEO title (60): 27 / 60; Meta description (160): 27 / 160; Tweet (280): 27 / 280; SMS (160): 27 / 160

FAQ

Is this a character counter with spaces?

Yes. The primary row, Characters (with spaces), includes spaces, tabs and line breaks. A second row shows the count without spaces so you can see both metrics side by side.

Why does the byte count differ from the character count?

ASCII characters use one byte each in UTF-8, but accented letters, symbols and emoji use two to four bytes. The byte count reflects actual storage or transmission size.

Can I use this as a textarea character counter for my form?

This page is meant for manual checks. To build a live textarea character counter into your own application, listen for input events on the element and apply the same counting logic shown here.

How are words counted?

Words are contiguous sequences of non-whitespace characters. Multiple spaces, tabs or newlines between words do not create empty entries.

Is my text sent to a server?

No. All counting happens locally in your browser. Nothing you type or paste leaves your device.

What is the difference between a character counter and a syllable counter?

A character counter measures text length in code points or bytes, while a syllable counter estimates pronunciation units for readability scoring.

Does this match Python's len() function?

The Code points row matches Python 3's len(), which counts Unicode code points. The main Characters rows count visible characters, so they can be lower for emoji sequences and accented letters built from combining marks.