Blog
Text tools

Space counter online

Paste your text and the counter shows how many spaces it contains and what share of the total length they take up. Useful when a platform's limit counts spaces separately from letters, or when you want a quick sense of how "airy" a text is.

Your data never leaves this device

Result

Spaces
Share of text length
Total whitespace characters

This page has no server side at all. The table you paste is parsed by JavaScript inside your own browser, the chart is drawn on a canvas element on your machine, and the export file is assembled locally. Nothing is uploaded, stored or written to any log. You can disconnect from the network after the page has loaded and everything will still work — which is the simplest way to verify the claim yourself.

Facts and limits of this method

Space The character U+0020 — a regular space between words
With "count tabs and line breaks too" Also counts tab characters (\t) and line breaks (\n, \r)
Non-breaking space U+00A0 is not counted — it is a distinct character from a regular space
Share spaces ÷ total text length × 100%

When it misleads you

How it is calculated

The main counter looks for the regular space character (U+0020) in the text and counts its occurrences.

The share of text length is the number of spaces divided by the total text length (spaces included), multiplied by 100.

"Total whitespace characters" is a separate number that matches any whitespace character by the regular-expression definition (\s): space, tab, line break, carriage return. It's always shown, regardless of the toggle, so you can compare the two.

The "count tabs and line breaks too" toggle decides which of the two numbers is shown in the large headline result — handy when a platform's limit formally counts "whitespace characters" rather than just spaces.

Questions and answers

Are leading and mid-line spaces counted the same way?

Yes, the counter doesn't distinguish them — any regular space character is counted regardless of its position in the line.

Why is the space count lower than I expected?

Some of the "spaces" in your text may actually be non-breaking spaces (U+00A0), which some editors insert before short words. That's a distinct character and the basic counter doesn't include it.

What's the difference between "spaces" and "total whitespace characters"?

The first counts only regular spaces. The second adds tabs and line breaks. Use whichever matches the counting rule of the platform you're posting to.

Is my text sent anywhere?

No, the whole count runs in your browser.

Related tools

All tools