Skip to content

Character Counter

Count characters with and without spaces, words, lines and UTF-8 bytes. Emoji and combined characters count as 1, as shown on screen, and a line break as 1.

Characters
0
Characters (no spaces)
0
Words
0
Lines
0
Bytes (UTF-8)
0B

What you enter is processed only in this browser and is never sent to a server. How it works

The five letters in Hello counted as five characters

How to use

Paste or type into the “Your text” box and five numbers appear below it. The two large ones are “Characters”, which includes spaces, and “Characters (no spaces)”. Next to them are “Words”, “Lines” and “Bytes (UTF-8)”. Character limits usually refer to one of the first two. Look at “Bytes (UTF-8)” when the question is storage size or a limit stated in bytes. With a very long text the numbers can trail a beat behind your typing. “Clear”, above the box, empties it in one go.

A worked example

Put Hello, world! on the first line and It is a well-known café 😀 on the second, and this is what you get.

Count Result How it adds up
Characters 39 13 on the first line + 1 line break + 25 on the second line
Characters (no spaces) 32 39 minus 6 spaces and 1 line break
Words 8 Hello, / world! / It / is / a / well-known / café / 😀
Lines 2 1 line break, plus 1
Bytes (UTF-8) 43 B 37 one-byte characters + 2 bytes for é + 4 bytes for 😀

The comma and the exclamation mark are counted as part of the word they follow, and an emoji standing on its own counts as 1 word.

What counts as one character

A character here is whatever shows up on screen as a single character. In Unicode’s terms that is a grapheme cluster, the unit that the Unicode text segmentation annex (UAX #29) maps to what a reader perceives as one character. Several codes that combine into one visible character still count as 1.

  • The family emoji (👨‍👩‍👧) is three person emoji held together by two invisible joiners, and it counts as 1.
  • A thumbs-up with a skin tone (👍🏽) is an emoji plus a color modifier, and it counts as 1.
  • An accented é counts as 1 whether it was stored as a single character or as an e plus a separate accent mark.

What counts as a space, a word and a line

  • Characters (no spaces): spaces, tabs, line breaks, full-width spaces (U+3000) and non-breaking spaces (U+00A0) are all left out. If you typed two spaces in a row, both go.
  • Words: each chunk between spaces is 1 word. The hyphenated well-known is 1 word, and so is don't with its apostrophe. The counter does not look at meaning or grammar, so in any language the word count is simply the number of space-separated chunks.
  • Lines: the number of line breaks plus 1. A blank line between paragraphs counts as a line. An empty box is 0 lines.
  • Text that is only a space: a single space gives 1 character, 0 characters without spaces, 0 words and 1 line.

UTF-8 bytes depend on the kind of character

“Bytes (UTF-8)” is how much room the text takes when it is stored as UTF-8. UTF-8 uses 1–4 bytes for each character (RFC 3629), so two texts with the same character count can have different byte counts depending on what they contain.

Character Examples Bytes
English letters, digits, basic symbols, spaces, line breaks A, 7, ! 1
Accented Latin letters é, ñ 2
Korean, Chinese and Japanese characters, the euro sign 가, 字, あ, € 3
Emoji 😀 4
Emoji built from several codes 👍🏽 / 👨‍👩‍👧 8 / 18

As the last row shows, an emoji that is 1 character can be far larger in bytes. If a field with a byte limit stops accepting input while you still seem to have characters left, check for characters like these.

Fitting a character limit

A limit like “1,000 characters or fewer” means different things in different places. Find out first whether it includes spaces, leaves them out, or is really measured in bytes.

  • If the rule isn’t stated, aim for “Characters”, the larger of the two numbers, and you are under the limit either way.
  • If the place you are submitting to counts a line break as 2 characters, leave room for one extra character per line break. A text in five paragraphs has 4 line breaks, so it comes out 4 characters higher there than it does here. With a blank line between each pair of paragraphs, that is 8 line breaks.
  • When you need to trim, look first at blank lines between paragraphs, doubled spaces and emoji. They bring the number down without touching what you wrote.
  • If the form you are submitting to shows its own counter, paste your text in and treat that number as the final word.

When the limit is in bytes, the only byte figure this counter shows is UTF-8. The byte count used by some South Korean job-application sites, which treats each Korean character as 2 bytes, is calculated separately in the Korean Cover Letter Byte Counter.

Sources

Frequently asked questions

How does the word count work for Japanese or Chinese, which don't put spaces between words?

Everything up to the next space or line break is one chunk, so a whole sentence comes out as 1 word. A 12-character Japanese sentence written without spaces gives 12 characters and 1 word. The counter doesn't analyze a sentence to split it into words, so for text in these languages go by the character count, not the word count.

I copied text from a web page or PDF and the count is higher than what I get counting by eye. Why?

There may be characters in it that you can't see. A zero-width space (U+200B) is invisible, but it isn't treated as a space, so it adds 1 to both Characters and Characters (no spaces) and 3 to the byte count. With one of them hiding between a and b, you get 3 characters and 5 bytes where you expected 2 characters. Delete the suspect passage, retype it by hand and see whether the numbers drop.

Two characters look exactly the same but give different byte counts.

The same letter can be stored in two ways. An é saved as a single character is 2 bytes. Saved as a plain e followed by a separate accent mark, it is 3 bytes. Either way it counts as 1 character. You tend to see this in file names and in text copied out of other programs, and it only matters when a byte limit is tight.

I pressed Enter once at the very end and the line count went up.

The empty line after a final line break counts as a line too. Two lines of text with one more line break at the end come out as 3 lines, and Characters goes up by 1. Characters (no spaces) and Words stay the same. If pasted text shows one line too many, delete the line break at the very end.

Which count should I use if another program gives a different result?

When the same text gets a different count somewhere else, the cause is usually one of three things. • The unit for a character: programs that count in the computer's internal units report 😀 as 2 characters and the family emoji (👨‍👩‍👧) as 8. This counter reports 1 for each. • Line breaks: this counter treats one line break as 1 character and 1 byte. Some places count a line break as 2 characters, and some don't count it at all. • What "spaces" covers: some programs take out only the spaces for the count without spaces and leave the line breaks in. If your text has no emoji or unusual spaces, the gap almost always comes from line breaks. Start by checking whether the two numbers differ by exactly the line count minus 1.

Last updated: