Whitespace Counter
Count the spaces, tabs and line breaks in your text and find the invisible characters hiding in it. The whitespace counter makes every space visible, flags double spaces, trailing spaces, non-breaking spaces and zero-width characters, and fixes them in one click.
- Shows hidden characters
- Finds double spaces
- One-click fixes with undo
Whitespace made visible
Your text with every space, tab and line break shown. Hover or tap a mark to see exactly which character it is.
- Space ·
- Tab →
- Line break ¶
- Non-breaking space °
- Other Unicode space
- Invisible character ¦
- Double space
- Trailing space
Your text appears here with the matches highlighted.
How to count spaces and whitespace
Finding every space, tab and hidden character takes three steps.
-
Paste your text
Text copied from a website, a PDF, a chat app, a spreadsheet or code. The counts update as you type.
-
See the whitespace
Your text is shown with every space as ·, every tab as →, every line break as ¶ and hidden characters in red. Hover over a mark to see exactly which character it is.
-
Fix what you find
Fix double spaces, trim spaces at the end of lines, turn special spaces into normal ones, or remove invisible characters. Undo is one click away.
The sample looks like ordinary text, but it hides a double space, a tab, three non-breaking spaces, a zero-width space and a line ending in spaces.
One space or two after a full stop?
Two spaces after a full stop is a habit from the typewriter era. Modern style guides use one: the Chicago Manual of Style says “a single character space, not two spaces, should be left after periods at the ends of sentences”, and most publishers ask for single spacing.
Fix double spaces replaces any run of two or more spaces between words with one space. Spaces at the start of a line, used for indenting, are left alone.
What the whitespace counter shows
Every kind of space, counted separately.
-
·
Spaces and tabs
Normal spaces and tab characters, counted separately.
-
¶
Line breaks
Every line break, with Windows CR+LF counted once.
-
°
Special spaces
Non-breaking spaces and other Unicode spaces that look normal but aren’t.
-
¦
Invisible characters
Zero-width spaces, joiners, byte order marks, soft hyphens and direction marks.
Whitespace counter FAQ
How do I count the spaces in my text?
Paste your text into the box. The number of spaces, tabs and line breaks appears straight away, and the text is shown below with every space visible.
What is whitespace?
Characters that show as empty space: spaces, tabs, line breaks and special spaces such as the non-breaking space. Unicode lists 25 whitespace characters.
What is a zero-width space?
An invisible character (U+200B) that marks where a line may break. It takes up no space, so you can’t see it, but it can break searches, links and data.
How do I remove double spaces?
Press “Fix double spaces”. Every run of two or more spaces between words becomes one space. Undo brings back the original.
Does a line break count as whitespace?
Yes. Line breaks are whitespace characters. A Windows line break (CR+LF) is two characters but counted here as one line break.
What is a non-breaking space?
A space (U+00A0) that stops a line from breaking between two words, such as “10 km”. It looks like a normal space, so it’s shown as ° here.
Is my text uploaded?
No. Everything is checked in your browser and nothing is sent anywhere.
Sources and references
- Whitespace character, Wikipedia
- Sentence spacing, Wikipedia
- Unicode Text Segmentation (UAX #29), Unicode Consortium
More text analysis tools
- Count Line Counter Count total, blank and duplicate lines in text, lists, code or CSV. Open tool
- Find Specific Character Counter Count how many times a letter, symbol, emoji or space appears in text. Open tool
- Distinct Unique Character Counter List every distinct character with its Unicode code point, and check for pangrams. Open tool
- #@% Symbol Counter Count symbols, punctuation and special characters, each with its name and code. Open tool