空白除去&テキストクリーナー

余分なスペース、タブ、空白行を削除して乱雑なテキストをクリーンアップします。

あなたのデータはデバイスを離れません

使い方

  1. 入力エリアにテキストを貼り付けます。
  2. 希望のクリーンアップオプションを選択します(デフォルトですべてチェック済み)。
  3. テキストをクリーンをクリックして処理します。
  4. クリーンな結果をコピーまたはダウンロードします。

よくある質問

スペースとして何がカウントされますか?

スペース、タブ、改行不可のスペース、その他のUnicodeスペース文字。改行は「空白行」と「改行を折りたたむ」オプションを介して個別に処理されます。

このツールはコンテンツを変更しますか?

いいえ。スペース文字のみを削除または折りたたみます。単語、句読点、その他のコンテンツはそのまま残ります。

コードに使用できますか?

可能ですが、注意が必要です · 先頭スペースを削除するとコードのインデントが破壊されます。クリーンアップ対象を正確に制御するには、個別のチェックボックスを使用してください。

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.

関連ツール

大文字小文字変換 フリーワード&文字カウンター・オンライン 行ソーター