Text File Counter
Find the number of lines, words and characters in a text file, along with its file size. Select a file to count its contents directly in your browser.
Select your file
Results
- Lines
- Characters
- Words
- File size
How counts are calculated
Lines: Windows (CRLF), Unix (LF), and older Mac (CR) line endings are supported. Blank lines count; a final line ending does not create an extra empty line. An empty file has zero lines.
Characters: Unicode code points, including spaces, tabs, and line-ending characters. A Windows CRLF counts as two characters. Combined symbols may contain multiple code points. A UTF-8 byte order mark is excluded.
Words: Groups of characters separated by whitespace. Punctuation attached to a word stays with that word. Languages without spaces are not segmented into individual words.
File size: The original file’s exact byte count, including any byte order mark. 1 KB = 1,024 bytes and 1 MB = 1,048,576 bytes.
File size and character count are different
File size measures bytes, while character count measures text. UTF-8 characters can use more than one byte, so a document containing accented letters or emoji may have more bytes than characters.