# Text Cleaner - Remove Extra Spaces & Line Breaks, Fix PDF Copied Text

> Free online text cleaner: strip extra spaces and blank lines, rejoin lines broken by a PDF copy, convert full-width ↔ half-width and CJK ↔ Latin punctuation.

- URL: https://qilingtools.com/en/text-clean
- Category: Productivity (https://qilingtools.com/en/office)
- Tags: [Text](https://qilingtools.com/en/tags/text), [Productivity](https://qilingtools.com/en/tags/office)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

Text copied from PDFs, web pages, chat apps or Word often arrives messy: every line hard-wrapped, runs of spaces, full-width letters and digits, mixed punctuation, stray HTML tags. This tool turns the common clean-ups into switches with a live preview. Joining lines keeps paragraph breaks, rejoins words hyphenated at line ends, and adds a space between English lines but none between Chinese lines. You can also convert full-width ↔ half-width characters, Chinese ↔ English punctuation, and insert spaces between CJK and Latin text. Everything happens in your browser.

## How to use

1. Paste the text into the left box
2. Toggle the clean-ups you need, such as join lines, remove empty lines or full → half width
3. Copy the live result on the right

## Features

- Join broken lines from PDF copies while keeping paragraphs
- Remove extra spaces, leading/trailing whitespace and empty lines
- Full-width ↔ half-width conversion for letters, digits, punctuation
- Chinese ↔ English punctuation without touching decimals or URLs
- Automatic spaces between CJK characters and Latin letters/digits
- Strip HTML tags and decode entities like &nbsp;
- Before/after character and line counts; feed the result back in

## FAQ

### Text copied from a PDF breaks at every line — how do I fix it?

Turn on "Join broken lines". Lines within a paragraph are merged (with a space for English, none for Chinese), words split with a hyphen at the line end are rejoined, and blank lines are kept as paragraph breaks. If the PDF has no blank lines between paragraphs, also enable "Keep line breaks after sentence-ending punctuation".

### What are full-width and half-width characters?

Full-width characters (ＡＢＣ１２３，) take the width of a CJK character, half-width ones (ABC123,) take half. Code, usernames, IDs and spreadsheets usually need half-width, while Chinese typesetting uses full-width punctuation. The tool converts either way in one click.

### Will converting to Chinese punctuation change decimal points?

No. Only commas, periods, question marks and similar marks that directly follow a Chinese character are converted, so 3.14 and www.example.com stay intact. Parentheses and quotes containing Chinese are converted as pairs.

### Is my text uploaded?

No. All processing runs locally in your browser with no network upload, and nothing is kept after you close the page. The tool is free and needs no account.

## Related tools

- [QiLing Mind](https://qilingtools.com/en/mindmap): QiLing Mind is a free online mind map editor: add nodes with Tab/Enter, drag to restructure, import and export XMind and Markdown, export PNG/SVG/PDF.
- [Password Generator](https://qilingtools.com/en/password): Free online random password generator: choose length, character sets and look-alike exclusions, generate several at once with a strength meter, all locally.
- [QR Code Generator](https://qilingtools.com/en/qrcode): Free online QR code generator: turn URLs, text, Wi-Fi or contact cards into QR codes with custom size, colour and error correction. Crisp PNG or vector SVG.
- [Word Counter](https://qilingtools.com/en/word-count): Free online word counter: live counts of characters with and without spaces, words, CJK characters, lines, paragraphs, sentences, bytes and reading time.
- [Case Converter](https://qilingtools.com/en/case-convert): Free online case and naming converter: get UPPERCASE, lowercase, Title Case, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE at once.
- [Lorem Ipsum Generator](https://qilingtools.com/en/lorem): Free online Lorem Ipsum generator: classic Latin placeholder text or Chinese filler by paragraph, sentence or word, with one-click copy for mockups.
- [Sort & Dedupe Text](https://qilingtools.com/en/text-sort): Free online text tool: sort lines alphabetically or by length, remove duplicate and empty lines, trim whitespace, optionally ignoring case. Runs locally.
- [Sign & Stamp PDF](https://qilingtools.com/en/pdf/sign): Free online PDF signing tool: drop in a handwritten signature or company stamp, drag it into place on a page preview, adjust size and opacity, then export.
