Skip to content
Shrake DevTools
  • JSON FormatterData & Format
  • JSON ValidatorData & Format
  • JSON MinifierData & Format
  • JSON ↔ YAML ConverterData & Format
  • XML FormatterData & Format
  • Base64 Encoder / DecoderData & Format
  • URL Encoder / DecoderData & Format
  • JWT InspectorData & Format
↑ ↓ to navigate↵ to openEsc to close

Whitespace Cleaner

Runs locally in your browser. Your input is not uploaded.Free, no sign-up

Input

Output

Trim lines, remove empty lines, normalize spaces and convert tabs to spaces.

How to use the Whitespace Cleaner

  1. Paste text, code or configuration, or click Sample. Spaces, tabs and trailing whitespace are made visible in both editors.
  2. Choose what to clean. The result and a summary of the changes update instantly.
  3. Copy or download the cleaned text.

What each option does

  • Trim trailing whitespace: removes spaces and tabs at line ends, the usual cause of noisy diffs.
  • Collapse repeated spaces: turns runs of spaces inside a line into one, leaving indentation alone.
  • Fix invisible characters: replaces non-breaking spaces with normal ones and removes zero-width spaces and byte-order marks, which often sneak in when copying from web pages, chat apps or Word, and break YAML, JSON and shell scripts.
  • Tabs: To spaces expands tabs to the next tab stop, keeping columns aligned; Indent with tabs converts leading spaces.
  • Line endings: converts between Windows (CRLF) and Linux/macOS (LF) line breaks.

Frequently asked questions

Why does my YAML fail with an invisible character?

A non-breaking space (U+00A0) looks like a space but isn't one, so YAML indentation or a key suddenly doesn't match. Fix invisible characters replaces it.

Is my text uploaded?

No. Cleaning happens in your browser.