Word Counter
Count words, characters with and without spaces, lines and UTF-8 bytes in any text. Paste text or open a .txt file. Accurate with emoji and Unicode. Free.
What is the Word Counter?
Whether you are trimming an essay to a word limit, checking a meta description, or sizing a message for an API, you need numbers you can trust. This word counter reports the word count first, then breaks your text down into Unicode characters, UTF-16 units, characters excluding whitespace, lines and UTF-8 bytes, all from a single click.
Words are counted as runs of non-space characters, so extra spaces or tabs between words never inflate the total. Because emoji and accented letters can take more storage than they appear to, the tool lists characters, UTF-16 units and bytes separately rather than hiding the difference. Paste text, type directly, or open a local text file; the counting happens entirely in your browser.
How to use the Word Counter
- Type or paste your writing into the Text to count box; a live character count under the box updates as you type.
- Alternatively, press Open a text file to load a local .txt, .csv, .json, .md, .html, .xml or .log file of up to 5 MB into the box.
- Press Process to count the text.
- Read the word count in the main result and the character, line and byte figures in the details below it.
- Use Copy result to grab the figures, or Reset to clear the box for a new piece of text.
Features
- Counts words as whitespace-separated tokens, ignoring repeated spaces, tabs and line breaks.
- Reports Unicode code points, UTF-16 units and characters excluding whitespace as separate figures.
- Counts lines, treating Windows, Mac and Unix line endings the same way.
- Calculates the exact UTF-8 byte size of the text.
- Handles up to 1,000,000 UTF-16 units of text, typed, pasted or loaded from a text file, with a live character count under the box.
Why use this word counter
- Lets you hit essay, article and social post limits without manual counting.
- Shows the real storage size of text before you save it to a database or send it to an API with a byte limit.
- Explains why emoji and accented text can count differently on different platforms.
- Keeps drafts private because nothing leaves your device.
How it works
Words are nonempty whitespace-delimited tokens; characters are Unicode code points; bytes use UTF-8. Empty text has zero lines.
Examples
Two short lines
Input: Hello world! Welcome to Toolnest.
Result: Words: 5 Unicode code points: 33 UTF-16 units: 33 Characters excluding whitespace: 29 Lines: 2 UTF-8 bytes: 33
Accented letter and emoji
Input: Café 🌍
Result: Words: 2 Unicode code points: 6 UTF-16 units: 7 Characters excluding whitespace: 5 Lines: 1 UTF-8 bytes: 10
Results are estimates for general information, not financial, medical, legal, tax, or property advice. Confirm important figures with the relevant institution or a qualified professional.
Word Counter: frequently asked questions
How does the tool decide what counts as a word?
A word is any unbroken run of non-whitespace characters. Spaces, tabs and line breaks separate words, and several spaces in a row still count as one gap. That means a hyphenated term like well-known counts as one word, and a number or a URL also counts as one. Punctuation attached to a word, such as a full stop, does not create an extra word.
Why are there three different character counts?
Unicode code points are the characters as Unicode defines them. UTF-16 units are what JavaScript and some platforms use for length limits, and an emoji usually takes two of them. Characters excluding whitespace removes spaces, tabs and line breaks. In the example Café 🌍, there are 6 code points but 7 UTF-16 units because the globe emoji needs two units.
Does it count emoji as one character?
It counts code points, not the visual symbols you see. A simple emoji is one code point, but some emoji, such as flags, skin-tone variants or family groups, are built from several code points joined together, so they count as more than one. The tool reports these figures honestly instead of guessing how many symbols appear on screen.
What is the UTF-8 byte count useful for?
UTF-8 is the encoding most websites, databases and APIs use to store text. Plain English letters take one byte each, accented letters usually take two, and emoji take four. If a field, SMS gateway or database column limits size in bytes rather than characters, this figure tells you whether your text will fit before you submit it.
How are lines counted?
Lines are counted by splitting the text at line breaks after converting Windows (CRLF) and old Mac (CR) endings to a single standard form, so the same text gives the same count on any system. Empty text has zero lines, and a trailing line break at the very end adds one more, empty, line to the total.
Can I count words in a document file?
You can load plain text files with the Open a text file button, including .txt, .csv, .json, .md, .html, .xml and .log files of up to 5 MB. Word processor formats such as .docx or PDF are not read directly; copy the text out of the document and paste it into the box instead. The text is read and counted locally, so the file never leaves your computer.