Whitespace Counter
Count whitespace characters in your text, including spaces, tabs, line breaks, non-breaking spaces, and other Unicode whitespace characters.
Enter Text
Whitespace Statistics
Whitespace Visualization
See where whitespace appears in your text. The markers below are visual only and do not change your original text.
Whitespace Breakdown
See which types of whitespace appear in your text and how many times each one occurs.
| Whitespace Type | Unicode | Count |
|---|---|---|
| Space | U+0020 | 0 |
| Tab | U+0009 | 0 |
| Line Break | U+000A / U+000D | 0 |
| Non-Breaking Space | U+00A0 | 0 |
How to Use the Whitespace Counter
Type or paste text into the box above. The Whitespace Counter automatically counts the whitespace characters in your text as you type.
The main counter shows your total number of whitespace characters and the total number of characters in the text. The detailed statistics show spaces, tabs, line breaks, non-breaking spaces, other whitespace, and non-whitespace characters separately.
What Is Whitespace?
Whitespace is a category of characters used to separate or format text. Although whitespace often appears as an empty area on the screen, it is still made up of actual characters.
Common whitespace characters include ordinary spaces between words, tabs used for indentation, and line breaks used to separate lines of text. Unicode also includes several special spacing characters with different widths and behaviors.
What Does the Whitespace Counter Count?
The Whitespace Counter separates whitespace into several useful categories so you can see exactly how your text is formatted.
Spaces
The Spaces counter measures ordinary space characters, also known as U+0020. These are the standard spaces normally inserted when you press the spacebar between words.
Tabs
Tabs are separate whitespace characters commonly used for indentation and alignment. A tab may appear visually similar to several spaces, but it is a single character.
Line Breaks
Line breaks separate one line of text from another. They are created when you press Enter or Return. Different operating systems and text formats may represent line endings differently, but the tool treats each logical line break as one line break for the Line Breaks statistic.
Non-Breaking Spaces
A non-breaking space is a special space character represented by Unicode code point U+00A0. Unlike an ordinary space, it is designed to prevent an automatic line break between the characters on either side of it.
Non-breaking spaces are common in copied web content and formatted documents. Because they usually look identical to normal spaces, they can be difficult to notice without a whitespace visualization tool.
Other Whitespace
The Other Whitespace counter includes less common Unicode whitespace characters that are not ordinary spaces, tabs, line breaks, or non-breaking spaces. Examples include thin spaces, narrow non-breaking spaces, em spaces, and other Unicode spacing characters.
Whitespace Visualization
Whitespace is normally invisible, which can make formatting problems difficult to find. The Whitespace Visualization displays your original text while adding visible markers for whitespace characters.
Ordinary spaces are represented with a dot, tabs with an arrow, and line breaks with a return symbol. Non-breaking spaces and unusual whitespace characters use their own markers so they are easier to distinguish from normal spaces.
These markers are only part of the visualization. They do not replace or modify the characters in your original text.
Whitespace vs. Invisible Characters
Whitespace characters and invisible characters are related, but they are not exactly the same thing. Spaces, tabs, line breaks, and non-breaking spaces are whitespace characters. However, some invisible characters are not classified as whitespace.
For example, zero-width spaces, zero-width joiners, and soft hyphens may be invisible or difficult to see while still being separate from the whitespace counted by this tool.
If you need to inspect those characters, use our Invisible Character Detector.
Why Count Whitespace Characters?
Counting whitespace can be useful when checking formatting, comparing text, cleaning copied content, debugging code, or investigating why two pieces of text that look identical behave differently.
Whitespace can also matter when a website, database, application, or text field has a strict character limit. Spaces and line breaks are still characters and may contribute to that limit.
For a general count of all characters in your text, use our Character Counter.
Does Whitespace Count as a Character?
Yes. Whitespace is made up of characters even though many of those characters are displayed as blank areas. An ordinary space, a tab, and a line break are all characters in a text string.
Whether a particular website or application counts every type of whitespace toward its own character limit can depend on how that service processes text.
Whitespace Counter FAQ
Does the Whitespace Counter count spaces?
Yes. Ordinary spaces are counted separately and are also included in the total Whitespace Characters count.
Are tabs counted as whitespace?
Yes. Each tab character is counted as one whitespace character, regardless of how wide the tab appears on the screen.
Are line breaks whitespace?
Yes. Line breaks are a form of whitespace and are included in the total whitespace count.
Does a non-breaking space count as whitespace?
Yes. The non-breaking space U+00A0 is counted as whitespace, and the tool also reports non-breaking spaces separately.
Does the tool count Unicode whitespace?
Yes. In addition to ordinary spaces, tabs, line breaks, and non-breaking spaces, the tool can detect other Unicode whitespace characters.
Is a zero-width space counted as whitespace?
No. A zero-width space is an invisible formatting character, but it is not included in the Whitespace Characters total on this tool. You can inspect zero-width characters with our Invisible Character Detector.
Can I see where the whitespace is in my text?
Yes. The Whitespace Visualization makes spaces, tabs, line breaks, non-breaking spaces, and other whitespace visible without changing your original text.
Does the tool change my text?
No. The visualization only displays visible whitespace markers in the output area. Your original text remains unchanged.