Whitespace Visualiser

Redraw pasted text so tabs, trailing spaces, line endings and characters you cannot see all become visible.

Runs on your deviceTextWorkingNo account needed

What this tool does

Whitespace Visualiser renders your text with every blank character made explicit. An ordinary space becomes a middle dot, a tab becomes an arrow, a line feed becomes a pilcrow, a Windows CRLF becomes ␍¶ and a lone carriage return becomes ␍ on its own, so the line endings in a file announce themselves instead of having to be inferred. Numbered lines sit in a gutter down the left, and a legend above the text names each marker that is currently switched on.

Characters with no width of their own get separate treatment: each one is replaced by a red badge carrying a short label, and hovering that badge names the character in full. The list is fixed and specific — the no-break space, the Ogham space mark, the en-quad to hair-space range, the narrow and medium mathematical spaces, the ideographic space, zero-width space, zero-width joiner and non-joiner, the word joiner, a byte-order mark, the soft hyphen, the left-to-right and right-to-left marks, the Unicode line and paragraph separators, and the control codes NUL, vertical tab, form feed and next line. Everything found is also listed underneath in a table giving the marker, the character's name, its code point in U+ notation and how many times it occurred.

Trailing whitespace is highlighted rather than merely marked, in a warning colour that runs from the first stray character to the end of the line, though a hidden character sitting inside that run keeps its red badge instead of the highlight. The summary under the output counts spaces, tabs and hidden characters, and names the line endings — LF, CRLF, CR, or a mixture reported as LF + CRLF when a file has been edited on two platforms. Spaces, tabs, hidden characters and line endings are tallied whether or not their marker is switched on, so turning one off only quietens the display. Trailing whitespace is the exception: its checkbox gates the detection itself, so switching it off zeroes the trailing-line figure as well as removing the highlight.

What it will not do is fix anything. The output is a view, not a document, and the marked-up text is never what Copy output puts on the clipboard: when hidden characters were found the button hands over that table as CSV — marker, name, code point and count — and when none were found it hands over nothing at all. Changing the text is a separate job — Remove Extra Spaces collapses runs of spaces and deletes zero-width characters, and Find and Replace handles a targeted substitution. Only the characters in the list above are named, so other control codes, variation selectors and combining marks pass through drawn as they are. A tab is shown as an arrow with a thin space after it rather than expanded to the next tab stop, so columns in a tab-separated table will not line up on screen. Text is pasted in — there is no file picker — and anything longer than two million characters is refused. All of the marking happens in this browser tab, so the text is not uploaded and the tool still works with the network off.

How to use it

  1. Paste the text you are suspicious of. Type or paste it into the input box, or press Load sample for a short block that already carries a tab, a trailing space, a no-break space, a zero-width space and a stray Windows line ending.
  2. Choose what gets marked. Six switches: ordinary spaces, tabs, line endings, trailing whitespace, non-breaking and zero-width characters, and line numbers. All six start on — turn off whichever ones make the display noisy for what you are actually hunting.
  3. Read the marked-up output. The legend above the text says what each marker means. A hidden character appears as a labelled badge such as NBSP or ZWSP, and hovering it gives the full name.
  4. Check the summary and the table. The line beneath the output gives the totals and the line-ending mix. Anything invisible that was found is listed by name, code point and count.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

The tab vs space argument in a code review

Two people looking at the same diff can be seeing different indentation. Marking both settles which lines use which before anyone edits the file.

A string comparison that keeps failing

A no-break space pasted out of a web page or a spreadsheet looks exactly like a space and matches nothing. Here it is a labelled badge rather than a mystery.

A CSV or config file a parser rejects

A byte-order mark at the start of the file becomes a labelled badge on line one, and a lone CR left by an old editor is drawn as ␍ with the summary reporting CR line endings.

Copy checked before it is published

Soft hyphens and zero-width joiners survive a copy out of a design tool or a CMS, then quietly break search and sorting once the text is live.

Questions

Does the text I paste leave this page?
No. The marking runs in this browser tab using the page's own JavaScript, so nothing is transmitted or stored, and the tool keeps working with the network disconnected.
Can it clean the text as well as show invisible characters?
No. It only shows invisible characters and counts them, and the output is a rendering rather than text you can paste back. Copy output gives you the hidden-character table as CSV, not a corrected copy of the text. Remove Extra Spaces trims and collapses whitespace and strips zero-width characters; Find and Replace makes a specific substitution.
Which characters count as hidden?
A fixed list: NBSP, the Ogham space mark, the Unicode spaces from en quad to hair space, the narrow and medium mathematical spaces, the ideographic space, ZWSP, ZWNJ, ZWJ, the word joiner, a BOM, the soft hyphen, the two directional marks, the line and paragraph separators, and NUL, vertical tab, form feed and next line. Anything outside that list is drawn as an ordinary character.
Why do my columns not line up in the output?
Each tab is drawn as one arrow glyph and a thin space instead of being expanded to the next tab stop, and long lines wrap inside the output panel. The display shows where whitespace sits, not how wide it renders in your editor.
What does LF + CRLF in the summary mean?
The text mixes Unix and Windows line endings, usually because it has been edited on both. Every line's ending is detected on its own, so the pilcrow and ␍¶ markers show which lines carry which.
How much text can it take at once?
Up to two million characters. A longer paste is refused with a message rather than locking up the tab, and a large input still takes a moment because every character is examined individually.

Related tools