What does a whitespace counter do?
A whitespace counter reports how many whitespace characters a text contains and separates them by kind: ordinary spaces, tabs, line breaks, non-breaking spaces and other Unicode whitespace. It also shows whitespace as a share of the whole text.
Whitespace is invisible, which is why it causes so many quiet problems. A non-breaking space pasted from a web page looks identical to a normal space but stops a line from wrapping. A tab where a space was expected breaks an indentation rule. A trailing space fails a validation check that nobody can see.
The visible preview replaces each kind with a marker, so a document that looks clean on screen can be inspected character by character. That is usually enough to find the one space that has been causing trouble.
How to count and inspect whitespace
- Paste or type the text into the box; the counts update as you type.
- Read the total and the split between spaces, tabs, line breaks and non-breaking spaces.
- Check the share of the text to see how much of it is layout rather than content.
- Look at the visible preview, where a middle dot marks a space, an arrow marks a tab and a special symbol marks a non-breaking space.
- Fix the text and watch the relevant count fall.
- Copy the summary for a record of the audit.
Whitespace Counter limits and rules
| Item | Limit |
|---|---|
| Input | Any plain text, code snippet or pasted document |
| Counted | Spaces, tabs, line breaks, non-breaking spaces and Unicode whitespace |
| Preview | Spaces, tabs and non-breaking spaces shown as visible markers |
| Line breaks | LF, CRLF and CR are each counted as one break |
| Share | Whitespace characters divided by all characters |
| Not covered | Rendering, indentation rules or whether the layout looks right |
When to use it
- Finding a non-breaking space that stops a line from wrapping.
- Auditing indentation before committing a code sample.
- Checking how much of a document is blank space.
- Cleaning text pasted from a PDF or a web page.
- Confirming that a file uses spaces rather than tabs.
Is it private?
Everything runs inside your browser. Your text and files are never uploaded, never stored and never seen by anyone else — including me. You can use the tool with the network tab open and watch no request leave the page. Closing the tab erases the input.
Frequently asked questions
It is a space character that prevents a line break at that point. It looks identical to a normal space, which is why it is hard to find by eye. It often arrives when copying from a web page or a word processor. The preview marks it separately so you can locate and remove it.
CRLF, LF and a lone CR are each counted as one line break. The count is about visible breaks, not about the byte size of the file. The byte and bit counter will show the size difference if you need it.
Yes, one tab character is counted once, even though it may display as several columns wide. The count is by character, not by visual width.
It is a quick measure of how much of a text is layout. Prose usually has a modest share, while code, tables and heavily indented documents run higher. A sudden jump can mean extra blank lines or tabs have crept in.
No. The analysis is done in the page. Nothing is sent to a server, stored or logged.
Related tools
Written and maintained by Md. Nur Hossain Repon.