What is Whitespace Visualizer?

Whitespace Visualizer makes invisible characters visible in your text. Spaces, tabs, newlines, carriage returns, non-breaking spaces, and zero-width characters each get their own color-coded marker, so you can spot formatting bugs, mismatched indentation, or stray characters in data files.

Each whitespace type gets its own colour: spaces become orange dots, tabs become arrows, newlines show the pilcrow symbol, and zero-width characters become a slashed circle. The tool counts each type separately so you can see at a glance whether a file uses tabs or spaces, mixes both, or contains stray invisible characters that break parsers. It also flags extended invisible characters — soft hyphens, word joiners, left-to-right and right-to-left direction marks, and en/em spaces — that ordinary editors hide entirely.

How to use

  1. Step 1 — Paste or type text into the input area. Whitespace characters are immediately highlighted with color-coded markers.
  2. Step 2 — Toggle which whitespace types to highlight: spaces, tabs, newlines, carriage returns, non-breaking spaces, and zero-width characters — plus extended invisible characters like soft hyphens, word joiners, direction marks, and en/em spaces. Set the tab width to 2, 4, or 8 columns and turn the line-number gutter on or off to match your editor.
  3. Step 3 — Review the character statistics showing counts of each whitespace type, and copy the annotated text if needed.

When to use

  • Hunting down why a CSV or TSV file refuses to parse correctly in pandas or Excel.
  • Auditing pasted code for mixed tabs and spaces before committing to a strict-lint repo.
  • Catching zero-width joiners or BOM characters that slipped into translated UI strings.

Result

A CSV file fails to parse. Paste a few lines into the visualizer to discover tabs mixed with spaces as delimiters, plus a hidden zero-width space in the header row causing the first column name to mismatch.

FAQ

What's a zero-width character and why do they break things?
Characters like U+200B (zero-width space) and U+FEFF (BOM) take no visual space but still count as bytes. They commonly slip in from Word, copied PDFs, or shell exports and cause string comparisons to fail in ways that look impossible until you spot them here.
How can I tell if my file uses tabs or spaces for indentation?
Paste the file and look at the counts panel. If tabs is 0 and spaces is high, you're space-indented. The reverse means tab-indented. Both non-zero usually means trouble in a Python or Makefile context where mixing is forbidden.
Does this work with non-Latin text like Arabic or Chinese?
Yes. The visualiser iterates by Unicode code point, so it correctly handles Arabic, CJK, and emoji. Non-Latin characters render normally; only whitespace gets replaced with markers, regardless of script.
What's the difference between a regular space and a non-breaking space?
A regular space (U+0020) lets browsers wrap lines at that point. A non-breaking space (U+00A0) refuses to break, keeping two words together. Copy-pasting from Word or PDFs often introduces NBSPs that look identical but confuse search, splitting, and trimming.
Can I export or copy the annotated view?
Yes. The copy button puts the annotated text on your clipboard with the markers in place, useful for posting in code reviews or bug reports where you need to show exactly which whitespace character is wrong.

Related Tools