Monu Tools

空白与换行清除器

清理杂乱的空白:修剪行、合并空格、删除空行和换行。

如何使用 空白清除器

  1. 01

    粘贴文本,例如从 PDF 复制的内容。

  2. 02

    选择你需要的清理选项。

  3. 03

    复制整理后的结果。

What it does

This is a whitespace cleaner for text that arrived messy, the kind you get when copying from a PDF, an email or a document, where stray line breaks, double spaces and blank lines are common.

It gives you a set of options you can combine: trim spaces from the ends of lines, collapse runs of spaces into one, remove blank lines, join everything onto a single line, or strip all whitespace entirely.

Everything runs in your browser, so your text never leaves your device.

The classic PDF paste problem

The problem it solves most often is pasting from a PDF, which stores text with fixed line breaks and padding for layout. The result usually has line breaks in the middle of sentences and doubled spaces, which this tidies up.

What each option does

Collapsing spaces replaces multiple spaces or tabs with a single space without touching line breaks, while removing blank lines drops the empty rows that pile up between paragraphs.

To turn broken lines back into flowing paragraphs, join them onto one line. To get a single continuous string with no spacing at all, remove all whitespace, which overrides the other options.

常见问题

为什么从 PDF 粘贴会出现奇怪的间距?

PDF 为排版使用固定换行和填充存储文本,因此复制的文本常在句子中间出现换行和双空格。本工具会移除它们。

“合并空格”有什么作用?

它将多个连续的空格或制表符替换为单个空格,而不影响换行。

“删除所有空白”有什么作用?

它去除每个空格、制表符和换行,留下一个连续的字符串。它会覆盖其他选项。

嵌入此工具

将此工具添加到你自己的网站。复制下方代码片段即可,它会自动保持最新。

<iframe src="https://monu.tools/embed/zh/whitespace-remover" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

相关工具