CountWord.com

Free Spaces & Whitespace Counter

Paste your text below to count every type of whitespace character. Regular spaces, tabs, and line breaks are obvious — but text copied from Word, web pages, or design software often contains invisible Unicode spaces that look identical but behave differently in code and publishing systems.

0
Total Whitespace Characters

Whitespace Breakdown

Rows with a non-zero count are highlighted. Paste text that may contain unusual spaces (e.g. copied from Word, a PDF, or a web page) to detect hidden characters.

Type Code Symbol Count

Types of Whitespace Explained

Most people know about the spacebar, Tab key, and Enter key. But Unicode defines over a dozen distinct whitespace characters, each with a different width and behaviour. Here is what each one is and where it comes from.

Space (U+0020) — The standard space

The everyday space produced by the spacebar. It is the most common whitespace character in any text document. Web browsers and most systems may collapse multiple consecutive standard spaces into a single rendered space unless the content is in a pre tag or uses white-space: pre in CSS.

Tab (U+0009) — Horizontal tabulation

Produced by the Tab key. In word processors, tabs jump to the next tab stop (typically every 0.5 or 1 inch). In code, a tab is typically rendered as 4 or 8 character widths depending on the editor. In HTML, tabs collapse to a single space like other whitespace. Tabs are important in Python, YAML, and Makefile syntax where indentation is semantically significant.

Line Feed (U+000A) — Unix newline

The standard line ending on Unix and macOS systems (LF). Each press of Enter in a Unix environment inserts a single line feed. HTML ignores line feeds in ordinary text, but they are critical in code, plain text, and CSV files.

Carriage Return (U+000D) — Legacy Windows/Mac line ending

Windows uses CR+LF (U+000D U+000A) as its line ending. Classic macOS (pre-OS X) used CR alone. If you paste text from a Windows document, you may have invisible carriage returns that cause unexpected behaviour in code or text processing. They are invisible in most editors and easy to overlook.

Non-Breaking Space (U+00A0) — The sneaky imposter

The non-breaking space prevents a line break at that position. It is inserted by pressing Option+Space on macOS or by typing   in HTML. Word processors insert them automatically in some situations (e.g. before units of measurement or after certain abbreviations). Pasting text from Word or a web page frequently introduces non-breaking spaces that look like regular spaces but cause bugs in code, databases, and search functionality.

En Space (U+2002) and Em Space (U+2003) — Typographic spaces

En space is the width of the letter N; em space is the width of the letter M (typically the same as the current font size). These are typographic spaces used in professional typesetting and design software. They can appear in text copied from InDesign, Illustrator, or certain rich text editors.

Thin Space (U+2009) — Narrow punctuation space

Used in French and some other European typographic conventions before punctuation marks such as «guillemets», colons, and semicolons. Also used in mathematics between units and numbers (e.g. 10 kg). Found in text copied from properly typeset publications.

Hair Space (U+200A) — Ultra-thin space

The thinnest standard space, used in typesetting to provide minimal spacing between characters without affecting kerning. Rarely appears in plain text but can be found in content exported from design tools.

Zero-Width Space (U+200B) — The invisible troublemaker

Completely invisible and has zero visual width. It is used to indicate possible word-wrap points without showing a gap. Web developers use it to allow long URLs or strings to break across lines. However, it frequently appears accidentally in text copied from certain websites, apps, or messaging platforms — and causes hard-to-diagnose bugs when pasted into code, APIs, or databases. This counter will detect it.

Narrow No-Break Space (U+202F) — Thin non-breaker

A thin non-breaking space used in French typography (before !, ?, ;, :, and » characters) and for separating digits in numbers (e.g. 1 000 000). Can appear in content from French-language sources or from certain language-aware text editors.

Ideographic Space (U+3000) — Full-width CJK space

The full-width space used in Chinese, Japanese, and Korean text, where it is the standard equivalent of a regular space. It appears in text from CJK sources and is the same width as a CJK character.

Figure Space (U+2007) — Number-width space

A space the same width as a digit (0–9), used for aligning numbers in columns without using a monospace font. Common in financial typesetting and tables.

Where Hidden Spaces Come From

You rarely type unusual whitespace characters deliberately — they arrive in your text through copy and paste. Here are the most common sources:

SourceCommon Hidden CharactersWhy It Matters
Microsoft WordNon-Breaking Space (U+00A0), Smart quotes, En dashPasting Word content into code or a CMS introduces invisible characters that break string matching and validation
Web pages / HTMLNon-Breaking Space (U+00A0), Zero-Width Space (U+200B)  entities and zero-width spaces are rendered invisibly in browsers but appear literally in plain text
PDF documentsVarious typographic spaces, Soft hyphensPDF text extraction is imprecise; spacing characters often do not survive the copy-paste process cleanly
Design tools (InDesign, Figma)Em Space, En Space, Thin Space, Hair SpaceProfessional typography uses refined spacing that most plain-text environments cannot replicate
Messaging appsZero-Width Space (U+200B), Zero-Width Non-JoinerUsed by some apps for formatting or tracking; land in text when messages are copied out
French / European textThin Space (U+2009), Narrow No-Break Space (U+202F)Correct French typography uses narrow spaces before specific punctuation marks

Frequently Asked Questions

Why does my text show non-breaking spaces when I paste from Word?
Microsoft Word inserts non-breaking spaces (U+00A0) automatically in several situations: after abbreviations like "Mr." and "Dr.", between numbers and units like "5 km", and before certain punctuation in some language settings. They look identical to regular spaces but are a different character code. In databases, search engines, and code, they behave differently — often causing "no match found" errors when users search for text containing them.
What problems can zero-width spaces cause?
Zero-width spaces (U+200B) are completely invisible and have no width, so they are nearly impossible to detect visually. They cause problems in string comparisons (two "identical" strings that don't match because one has a hidden character), in API inputs that fail validation, in search queries that return no results, and in code where they can silently break syntax.
How do I remove non-standard spaces from my text?
After identifying which types are present using this tool, you can use find-and-replace in your editor to replace the specific character with a standard space. In most code editors, you can search by Unicode code point. In a plain text editor, you can often paste the character into the search field directly. Many programming languages also provide functions for normalising Unicode whitespace.
Are line breaks counted as whitespace?
Yes — line feeds (Enter / Return) are whitespace characters. This counter counts them separately from spaces. Windows line endings (CR+LF) contribute both a carriage return and a line feed to the count, which is why Windows text files can show a higher whitespace count than the same content on Unix.
Is my text sent to a server for analysis?
No. All counting and detection runs entirely inside your browser. Nothing you paste is ever sent to our servers — you can safely paste confidential or sensitive text.