Word Counter

Count characters, words, and lines in real time

0With spaces
0Words
0Lines
0UTF-8 bytes
0EUC-KR bytes
0X characters (limit 280)

X count: CJK characters and emoji 2, Latin letters and digits 1, links 23

About Word Counter

The counter shows characters with spaces, characters without spaces, words and lines, plus UTF-8 bytes, EUC-KR bytes and the weighted character count used by X (Twitter). Characters are counted as grapheme clusters using the browser's Intl.Segmenter, which means a family emoji like 👨‍👩‍👧‍👦 counts as one character, the way a reader sees it. Ask JavaScript for the same string's .length and you get 11; ask for its UTF-8 size and you get 25 bytes.

That gap is the whole story of character counting. A "character" means something different to a word processor, a database column, a social network and a submission form, and limits are enforced in whichever unit the developer happened to pick. The sections below explain the common units and how to read this tool's numbers against them.

Four ways software counts a character

Grapheme clusters are what humans perceive as a single character: é, 한, or a flag emoji. This tool uses them. Code points are the numbered entries in Unicode; é can be one code point (U+00E9) or two (e plus a combining accent), and both look identical. UTF-16 code units are what JavaScript's .length and many Java and .NET APIs count; any emoji outside the Basic Multilingual Plane takes two. Bytes are what a database column or a legacy form limit really measures: ASCII letters take 1 byte in UTF-8, accented Latin letters 2, Korean, Chinese and Japanese 3, most emoji 4.

When a form says "max 500 characters" and rejects text that this tool says is 480, the form is usually counting code units or bytes. Emoji-heavy text and CJK text are where the numbers drift furthest apart.

X (Twitter): 280 is a weighted total

X's developer documentation defines the limit as a weighted sum of 280. Latin letters, punctuation and common symbols weigh 1. Chinese, Japanese and Korean characters weigh 2, so a post written only in Japanese tops out at 140 characters. Every emoji weighs 2 regardless of skin-tone modifiers or zero-width-joiner sequences, and every URL counts as 23 because it is wrapped in a t.co link, however long or short the original address is. Text is normalized to Unicode NFC before counting.

The "X characters" box applies these rules (the twitter-text method) and turns red above 280. A 250-character English post plus one link is 250 + 1 space + 23 = 274, which fits. The same post with three emoji added is 280, exactly at the limit. Links are recognized when they start with http://, https:// or www., or end in a common domain such as .com or .org.

Bytes in legacy systems

Older Korean systems often use EUC-KR, where each Hangul syllable is 2 bytes and ASCII is 1. It covers only the 2,350 precomposed syllables of KS X 1001, so rare syllables fail to save or turn into question marks. Japanese systems built on Shift_JIS behave similarly: 2 bytes for kana and kanji, 1 for ASCII. If an application form states its limit in bytes, a Korean-only answer of 1,000 characters is 2,000 bytes in EUC-KR but 3,000 in UTF-8. This tool shows both UTF-8 and EUC-KR bytes. Its EUC-KR figure follows CP949, the extended form browsers and Windows use under that name, so all 11,172 Hangul syllables count as 2 bytes; characters EUC-KR cannot encode at all, such as emoji, are left out of the count and listed below it. Line breaks count as 1 byte (LF), so a site that counts CRLF will be slightly higher; its own counter is the final word.

What this counter treats as whitespace and lines

"Without spaces" removes everything the JavaScript \s class matches: spaces, tabs, line breaks, the no-break space (U+00A0) and the ideographic space (U+3000). The zero-width space (U+200B) is not in that class, so it survives and is counted as a character even though you cannot see it. Text pasted from web pages and PDFs often carries these; if the count seems one or two too high, that is a likely cause.

Words are runs of non-whitespace separated by whitespace. Hyphenated terms like "well-known" count as one word, and a Japanese or Chinese sentence without spaces counts as one word. Lines are the number of line breaks plus one, so a trailing newline adds an empty line.

A Windows line ending (CRLF, \r\n) is a single grapheme under Unicode's segmentation rules, so it adds 1 to the with-spaces count. Counters that use .length add 2 per line, which explains small disagreements on long documents.

Word counts in publishing and school

Word limits for essays and articles are usually checked with the word processor's own counter, and those differ on edge cases: whether an em dash between two words joins them, whether numbers or URLs count, whether footnotes are included. For a hard limit such as a college application essay, leave a margin of a few words rather than aiming for the exact number.

Worked examples

A short cover-letter sentence

Input
I led a team of 5 engineers. We shipped on time.
Output
With spaces 48 / Without spaces 38 / Words 11 / Lines 2

28 characters on the first line, 1 line break, 19 on the second. Removing the 9 spaces and the line break leaves 38.

Invisible characters

Input
a[NBSP]b[ZWSP]c (contains U+00A0 and U+200B)
Output
With spaces 5 / Without spaces 4 / Words 2

The no-break space is treated as whitespace and removed; the zero-width space is not, so it stays as a counted character. It looks like "a bc" on screen.

One emoji, many units

Input
👨‍👩‍👧‍👦
Output
With spaces 1

Seven code points (four people joined by three ZWJ), eleven UTF-16 code units, 25 UTF-8 bytes, one visible character. X counts it as 2.

How to use it

  1. Paste or type your text into the box.
  2. The character, byte and X counts update as you type.
  3. Pick the number that matches the rule you are writing for, converting for weighted or byte limits if needed.

Frequently asked questions

Why does another site give me a different character count?

It is probably counting UTF-16 code units (emoji count as 2) or bytes, or it treats line breaks differently. This tool counts what you see.

Does this match X's 280-character limit?

Use the "X characters" box. It weighs CJK characters and emoji as 2, Latin letters, digits and punctuation as 1, and each link as 23, and turns red above 280.

Why is my Japanese or Chinese text one word?

Words are split on whitespace, and those languages don't put spaces between words. Use the character count instead.

Can I see the byte size?

Yes. UTF-8 and EUC-KR byte counts are shown below the character count. For plain English text, UTF-8 bytes equal characters; each accented letter adds 1, each CJK character adds 2, and most emoji add 3.

Related guides

Sources

Last reviewed:

Privacy and how data is handled