AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do I see invisible whitespace and hidden characters in text?

Paste your text into AnyTool Whitespace Visualizer. It renders every space as a dot, every tab as an arrow at your chosen tab width, and every line break labelled LF, CRLF or CR. Non-breaking spaces and zero-width or bidirectional characters are flagged in red, trailing whitespace is highlighted per line, and mixed indentation is detected. You can then clean the text in one click. Everything runs in your browser, so nothing is uploaded.

  • Spaces shown as · or ␣, tabs as → or ⇥ with selectable tab width (2/4/8)
  • Line breaks labelled LF (Unix), CRLF (Windows) or CR (classic Mac)
  • Non-breaking spaces and zero-width / bidi characters flagged in a warning colour
  • Trailing whitespace highlighted and mixed tab/space indentation detected
  • One-click cleanup: strip trailing, normalise endings, NBSP to space, remove zero-width, tabs to spaces — 100% client-side

What is

Whitespace Visualizer

A whitespace visualizer is a tool that renders normally invisible characters — spaces, tabs, line breaks, non-breaking spaces and zero-width characters — as visible markers, so you can spot trailing whitespace, mixed indentation, inconsistent line endings and hidden characters that change how text behaves.

Text Tools

Related terms

Invisible CharactersTrailing WhitespaceLine EndingsTabs vs SpacesZero-Width Space

Frequently Asked Questions

No. All analysis runs in your browser, so your text never leaves your device and the tool works offline.

Every marker, count and cleanup is computed locally in your browser using JavaScript. Nothing is sent to a server, there is no tracking, and the page works offline after first load — so you can safely inspect confidential code, configuration files or pasted text.

LF is a single line feed used on Unix and macOS, CRLF is a carriage return plus line feed used on Windows, and CR alone is the classic Mac style.

A line ending marks where one line stops and the next begins. LF (U+000A) is standard on Linux and modern macOS, CRLF (U+000D followed by U+000A) is standard on Windows, and a lone CR (U+000D) was used on classic Mac OS. The visualizer counts each style, labels every line, and warns when a file mixes them, because mixed endings are a common cause of noisy diffs and broken scripts.

Use the cleanup buttons: one removes zero-width and bidirectional characters, another converts non-breaking and Unicode spaces to a normal space.

Zero-width characters (such as the zero-width space U+200B and the byte-order mark U+FEFF) and non-breaking spaces (U+00A0) are invisible but can break searching, code and string comparison. The visualizer flags them in red, then lets you strip zero-width characters or convert non-breaking and other Unicode spaces to a plain space in one click, editing the text in place so you can copy the clean result.

Yes. It reports how many lines use tabs, spaces or a mix, and warns when indentation is inconsistent.

The tool inspects the leading indentation of every line, counts tab-indented, space-indented and mixed lines, and guesses the indent width when spaces dominate. It flags a file as inconsistent when it mixes tab and space indentation or has lines that combine both — the kind of issue that breaks YAML, Python and code review diffs — and you can convert tabs to spaces, or spaces to tabs, with one click.

Detailed Explanation

Methodology

How the Whitespace Visualizer Works

AnyTool Whitespace Visualizer analyses text entirely in the browser. It tokenises each line into typed runs — visible text, spaces, tabs, non-breaking spaces, other Unicode spaces, and zero-width or bidirectional characters — and records each run’s position so it can be rendered with a distinct marker. Line endings are detected per line by scanning for carriage return and line feed sequences, distinguishing LF, CRLF and a lone CR, and indentation is classified from the leading whitespace of every line.

  • Text is split into lines, then into typed whitespace/visible/hidden runs
  • Spaces render as ·/␣, tabs as →/⇥ at a selectable width (2, 4 or 8)
  • Line endings classified as LF (Unix), CRLF (Windows) or CR (classic Mac)
  • Leading indentation classified per line as tabs, spaces, mixed or none
  • All analysis is client-side JavaScript — no server round-trip
How It Works

Detecting Hidden Characters and Inconsistencies

Beyond visible spacing, the tool surfaces the problems that whitespace causes. It flags non-breaking spaces (U+00A0), other Unicode spaces such as en, em, narrow and ideographic spaces, and zero-width or format characters — zero-width space, byte-order mark, soft hyphen, word joiner and bidirectional controls — in a warning colour. Trailing whitespace is highlighted on each line, a document is reported as having mixed line endings when more than one style is present, and indentation is reported as inconsistent when tab- and space-indented lines coexist.

  • Non-breaking and other Unicode spaces flagged separately from normal spaces
  • Zero-width, BOM, soft-hyphen, word-joiner and bidi characters highlighted
  • Trailing whitespace highlighted per line and counted across the document
  • Mixed CRLF/LF/CR endings and mixed tab/space indentation are detected
  • A live dashboard summarises every count and the dominant styles
Privacy & Security

Cleanup and Privacy

Each issue has a matching one-click fix that edits the text in place: strip trailing whitespace, normalise endings to LF or CRLF, convert non-breaking and Unicode spaces to a plain space, remove zero-width characters, and convert tabs to spaces or spaces to tabs at the chosen width. Because all rendering and cleanup run in the browser, the text never reaches a server, there is no account or tracking, and the page works offline after first load. Large input is rendered through a virtualized list so the view stays responsive.

Whitespace inspection: in-browser (AnyTool) vs typical online viewers
CapabilityAnyToolTypical online viewers
Text handlingProcessed in your browserOften posted to a server
PrivacyText never leaves deviceMay log or store submitted text
Line-ending labelsPer-line LF / CRLF / CROften a single overall guess
Tab width controlSelectable 2 / 4 / 8Frequently fixed
Hidden-character flagsNBSP + zero-width + bidiUsually basic or absent
Mixed-indent detectionPer-line tabs vs spacesRarely built in
One-click cleanupTrim, endings, NBSP, zero-width, tabsOften view-only
Works offlineYes (PWA)No

Server-based viewers can retain pasted text in logs; AnyTool renders and cleans every character locally and uploads nothing.