Make text spacing consistent

Whitespace Normalizer

Normalize spaces, tabs, no-break spaces, line endings and blank lines with rules you can see. Your original text stays untouched beside a separate result.

Paste text with inconsistent spacing

Choose a preset, then adjust any individual rule.

Start with a preset
Normalization rules
Up to 10,000 Unicode code points

Normalization happens in your browser. Text is not uploaded, stored or read from your clipboard automatically. How tool text is handled

Your normalized result will appear here

Choose a preset or individual rules, then normalize the text.

Follow the spaces through each rule.

NBSP and tab conversion happen before repeated spaces collapse
Demonstration using the Clean copied text preset: conversion creates ordinary spaces; collapse then reduces each run to one.

Rules run in this order: line endings → NBSP conversion → tab expansion → repeated-space collapse → line-edge trimming → blank-line handling. So a tab set to two spaces can still end as one space when collapse is on. To keep two, turn collapse off; to keep leading indentation, also turn line-edge trimming off.

The first example matches the worked example below. The second uses Line endings only on Item[TAB]Qty and Pen[TAB]2; its output keeps both tabs and the line break.

Choose settings for the text you actually have

Input and goalStarting settingsCheck before copying
Prose with accidental NBSP and extra spacesClean copied textNBSP conversion permits wrapping; keep it off where words must stay together.
Tab-separated spreadsheet rowsLine endings only; keep tab conversion, collapse and edge trimming offTabs may separate columns. Replacing them changes the data structure.
Indented codeLine endings only; change individual rules only if requiredThe tool does not parse code or know which indentation is meaningful.
PDF text with a line break after every lineInspect firstThis tool retains non-empty line boundaries. It does not join wrapped lines, repair hyphenated words or reconstruct PDF columns.

Clean spacing without flattening every kind of invisible text.

A text spacing normalizer should transform only the classes you select. It should not silently strip all Unicode formatting.

Repeated spaces

Runs of ordinary U+0020 spaces become one. This does not collapse tabs unless tab conversion is enabled.

Tabs

Each U+0009 tab becomes the exact number of regular spaces you choose. Visual alignment can still vary in proportional fonts.

No-Break Space

U+00A0 can be converted to U+0020 when copied web or document text breaks search, matching or wrapping.

Blank lines and edges

Trim line-edge spaces and choose whether to keep all blank lines, keep one between blocks, or remove them.

Zero-width and language controls are preserved.

This tool does not remove U+200B, U+200C, U+200D, bidirectional controls, Hangul Filler or Braille Pattern Blank. That separation prevents an ordinary spacing cleanup from changing scripts or emoji unexpectedly.

Normalize spacing without guessing.

Every rule stays visible, the original text is never replaced, and the change summary names the rule that did the work.

  1. Paste a copy of the text that already has the wrong spacing.

    Paste from the document, spreadsheet export or message where the problem appears. Nothing is uploaded, and the source file is not touched.

  2. Start from the preset that matches the destination.

    “Clean copied text” handles regular spaces, NBSP, tabs, line endings and blank lines. “Keep paragraph spacing” keeps every blank line. “Line endings only” converts CRLF and CR to LF and changes nothing else.

  3. Turn single rules on or off instead of repairing afterwards.

    If a rule would damage the text — tab conversion inside code, collapsed runs inside aligned columns — leave it off. The rule list is deliberately short.

  4. Compare the visible whitespace, then copy the result.

    The result panel shows one count per change category plus a before/after whitespace map. Only the copy button writes a result you can paste elsewhere.

What one run actually reports.

Text copied from a web page often arrives with an NBSP between words, tabs from a table and trailing spaces at the end of lines. Using the notation from the whitespace map:

Pasted text

Report⍽⍽2026→Total··
··Quarter·1··
↵
↵
··Quarter·2

· regular space NBSP tab line break

After “Clean copied text”

Report·2026·Total
Quarter·1
↵
Quarter·2

Two NBSP become spaces, the tab becomes two spaces and then collapses to one, other repeated spaces collapse, line edges are trimmed and the double blank line becomes one.

The summary is per rule, not a single “cleaned” badge.

You get separate numbers for line endings, NBSP, tabs, collapsed spaces, trimmed edge spaces and removed blank lines. If a number is larger than expected, switch the preset instead of editing the result by hand.

Spacing, not hidden characters, is the problem.

Text pasted from a PDF, email or web page

Copied paragraphs mix regular spaces, NBSP and tabs. Converting NBSP to U+0020 and collapsing runs makes the paragraph behave like the rest of your document.

Values that fail an exact match

A trailing space or an NBSP inside a copied part number makes two identical-looking values compare as different in a spreadsheet, a filter or an import.

Lines with accidental indentation

Line-edge trimming removes the stray leading space that turns a list entry, a heading or a command into an invalid value.

Drafts that need a predictable paragraph rhythm

“Keep one” blank line between blocks gives consistent paragraph breaks before text is pasted into a form, a CMS field or an email template.

What this normalizer will not fix.

A text that looks empty but is not

If a field still behaves as though it contains something after normalization, the cause is probably a zero-width or blank-looking character. Check the code points before cleaning further.

Spacing you actually want

Alignment built from repeated spaces is fragile in proportional fonts, but the tool will not decide for you. Leave “collapse repeated spaces” off when the repeats are intentional.

Meaning carried by tabs

In source code, build files and tab-separated exports a tab is data. Converting tabs to spaces can change behaviour, which is why tab conversion is an explicit rule instead of automatic.

Unicode form, case and punctuation

Different Unicode representations of the same accented letter, curly versus straight quotes and letter case are outside this tool. It only applies the whitespace rules you select.

Whitespace normalizer FAQ

Is this the same as “remove all spaces”?

No. Removing every space joins words together. Normalization keeps the single spaces that separate words and changes only selected classes: runs of spaces, tabs, NBSP, line-edge spaces, line endings and blank lines.

Does it delete zero-width characters such as U+200B?

No. Zero-width, joining and bidirectional controls are preserved here, because removing them can change line breaking, script shaping or emoji. Use the invisible character remover when deletion is the actual task.

Why did my tab become two spaces instead of one?

Tab width is a choice, not a fact about the character. A tab is a single code point with no fixed visual width, so the “Clean copied text” preset expands it to two spaces and the preset label states that. Change the tab width if your destination expects four or eight.

Can normalization change the meaning of my text?

Yes, when whitespace is data. Converted tabs or removed blank lines inside code, indentation-sensitive formats or aligned columns change the text. Review the before/after panel and leave the relevant rule off when the layout carries meaning.

Why does the result still contain invisible characters?

Because this tool only touches spacing characters. If U+200B, U+200C, U+200D, U+2060, U+FEFF, U+2800 or U+3164 are present, they survive normalization on purpose. The checker shows whether they are there.

How much text can I paste, and does it leave my browser?

Up to 10,000 Unicode code points; longer input stops with an explanation instead of a partial result. All processing happens in this page, and the text is not uploaded, stored or read from your clipboard. See how tool text is handled.