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/th/whitespace-remover" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

เครื่องมือที่เกี่ยวข้อง