Leerzeichen-Entferner und Textreiniger

Räumen Sie wirres Text auf, indem Sie überflüssige Leerzeichen, Tabs und leere Zeilen entfernen.

Ihre Daten verlassen niemals Ihr Gerät

So funktioniert es

  1. Fügen Sie Ihren Text in das Eingabefeld ein.
  2. Wählen Sie die gewünschten Reinigungsoptionen (standardmäßig alle aktiviert).
  3. Klicken Sie auf „Text aufräumen" zur Verarbeitung.
  4. Kopieren oder laden Sie das bereinigte Ergebnis herunter.

Häufige Fragen

Was zählt als Leerraum?

Leerzeichen, Tabs, geschützte Leerzeichen und andere Unicode-Leerraumzeichen. Zeilenumbrüche werden separat über die Optionen „Leere Zeilen" und „Zeilenumbrüche reduzieren" behandelt.

Verändert dieses Tool meinen tatsächlichen Inhalt?

Nein. Es entfernt oder reduziert nur Leerraumzeichen. Ihre Wörter, Satzzeichen und sonstigen Inhalte bleiben unangetastet.

Kann ich das für Code nutzen?

Ja, aber mit Vorsicht · das Entfernen führender Leerzeichen aus Code zerstört die Einrückung. Nutzen Sie die einzelnen Kontrollkästchen, um genau zu steuern, was bereinigt wird.

What "whitespace" actually means

A whitespace character is one that produces blank space when text is rendered, instead of a visible glyph, used to separate words, indent lines, and break paragraphs. The Unicode Character Database assigns the formal White_Space property to exactly 25 code points. The familiar suspects (space, tab, line feed, carriage return) cover most of what you'll ever paste, but the full list also includes the no-break space (U+00A0), narrow no-break space (U+202F), 11 typographic spaces in the U+2000–U+200A range, the line and paragraph separators (U+2028, U+2029), the medium mathematical space (U+205F), and the full-width ideographic space (U+3000) used after CJK punctuation.

A separate group looks invisible but is not classified as whitespace by Unicode: the byte-order mark (U+FEFF), zero-width space (U+200B), zero-width joiner and non-joiner (U+200D, U+200C), word joiner (U+2060), and soft hyphen (U+00AD). These are formatting controls, not spaces, most "I cleaned my text but something's still wrong" reports trace back to one of them.

What this tool does, option by option

All six options are independent toggles (un-check any you want to skip) and each one runs only over the text you paste. Nothing is uploaded; the cleaning happens in your browser via JavaScript regex passes.

When you'd reach for this

Common gotchas

Brief technical context

This tool runs entirely in your browser using JavaScript's built-in regex engine. String.prototype.trim() in modern engines (every evergreen browser since around 2015) strips both no-break space and the byte-order mark, because the ECMAScript spec defines its trim set as the union of WhiteSpace and LineTerminator productions, a list that covers tabs, plain space, NBSP, BOM, the typographic spaces, and CR / LF / LS / PS line breaks. It excludes only one Unicode whitespace character, U+0085 (NEL), which is a curiosity inherited from EBCDIC and almost never appears in modern text.

For very large inputs, the slow part is rarely the regex pass, it's writing the result back to the textarea and re-rendering the DOM. Inputs up to a few megabytes are typically fine on a modern laptop; beyond that, command-line tools (tr, sed, awk, or a short Python script) are usually faster.

More questions

What's the difference between a regular space and a no-break space?

They render at the same width but the no-break space (NBSP, U+00A0) tells the renderer not to break a line at that point. Word, Google Docs, and many CMSes insert it between honorifics and surnames (Mr. Smith), between numbers and units (10 km), or around currency symbols ($ 5). It's the single most common "weird" character to find in pasted text, and it's why the same-looking gap between two words sometimes resists a regex written for plain spaces.

Will this remove zero-width characters or the byte-order mark?

JavaScript's whitespace handling generally catches the byte-order mark (U+FEFF). It does not catch zero-width space (U+200B), zero-width joiner (U+200D), zero-width non-joiner (U+200C), word joiner (U+2060), or soft hyphen (U+00AD), Unicode does not class those as whitespace, so they survive a whitespace pass by design. If you suspect one of those is in your text, you'll need an invisible-character inspector instead.

Why are blank lines and consecutive newlines two separate options?

"Remove blank lines" deletes every empty line, the result is one continuous block of text with no paragraph breaks. "Collapse multiple newlines to one" keeps a single newline between paragraphs and only removes the extras. If you want readable paragraphs in the output, leave the first option off and use the second.

Is there a length limit?

There's no hard limit, the tool can comfortably handle text in the range of tens of thousands to a few million characters on a modern laptop. The limit is your browser's textarea performance: very large pastes start to lag during typing or copying, not during the cleaning step itself.

Does anything get sent to a server?

No. The text never leaves your browser. The cleaning runs locally in JavaScript, the result is written back into a textarea on the same page, and you can use the page offline once it's loaded. The same applies to every tool on Absolutool.

Verwandte Tools

Groß-/Kleinschreibungskonverter Kostenloser Wort- und Zeichenzähler Online Zeilensortierer