PDF Text Cleaner
Fix unwanted line breaks and spacing in text copied from a PDF.
How to clean copied PDF text
- Paste the original plain text to start cleaning automatically. Choose paragraph repair or spacing only, and enable optional changes only when needed.
- Review the updated excerpts and decide whether each uncertain hyphen should be removed, retained or left unchanged. Each decision updates the result automatically.
- Copy the cleaned result when processing finishes. Changes to the source or settings update the result and reset hyphen choices; typing waits for a short pause. Clear removes both texts and restores default settings.
Features
- Joins likely wrapped lines while keeping paragraph breaks
- Lets you decide uncertain line-final hyphens
- Offers spacing-only and optional cleanup controls
- Preserves recognized lists, code and standalone links
- Shows excerpts so you can review proposed changes
Use cases
- Clean text copied from a PDF for an email
- Repair line wraps before editing a document
- Prepare copied PDF text for translation or quotation
- Make passages easier to search and paste into notes
What this cleaner changes
PDF copy-paste often inserts a newline at each visual line ending. This tool joins eligible lines, but a newline alone cannot reveal the author’s intent. It preserves blank paragraphs, recognized lists, fenced or indented code, tabular lines and standalone URLs, emails and paths. Sentence-ending punctuation also prevents a join. Headings, poetry and citations are not detected perfectly; review changes or use spacing only.
A line-final hyphen can split a word or belong to a compound. Each occurrence has its own decision and stays unchanged by default. Repairs always start from your current original, so resetting choices never compounds earlier edits. Cleaning an already cleaned result can expose new joins; it is not guaranteed to be idempotent.
Automatic joining omits spaces only between adjacent Han characters. It is not language detection and cannot infer every Japanese, Korean, Thai or Khmer boundary. Optional changes cover only U+00AD, ff/fi/fl/ffi/ffl, U+00A0/U+202F and repeated ASCII spaces. Protected structures remain exact. Tabs, trailing hard-break spaces, combining accents, emoji, shaping controls and other Unicode characters are preserved.
Examples: before → after
A wrapped ␊ sentence. → A wrapped sentence. (␊ denotes a line break, without the surrounding display spaces.)
inter-␊national → unchanged by default; choose removal for international, or retention for inter-national. state-␊of-the-art → state-of-the-art with retention.
中文␊文本 → 中文文本 in Automatic mode. file → file only with ligature expansion. First paragraph.␊␊Second paragraph. keeps both line breaks.
Local processing and limits
Processing is local to your browser; this tool does not upload or persist drafts. Shared site analytics and advertising can still make network requests. Editors and review excerpts use the site’s masking attributes. The 500,000 UTF-16-unit limit is not a visible-character count; emoji may use more than one unit. Oversized input is retained without truncation.
Frequently asked questions
Related tools
JSON to YAML
Convert JSON to YAML locally while preserving number text and quoted strings; copy or download the complete result.
Open tool — JSON to YAMLYAML to JSON
Convert one YAML document locally to JSON with exact number text and bounded aliases, then copy or download the complete result.
Open tool — YAML to JSONHTML to Markdown
Convert pasted or local HTML into Markdown, review conversion notes, and copy or download the result.
Open tool — HTML to MarkdownJavaScript Regex Tester
Test a JavaScript pattern locally and inspect matches, captures, and UTF-16 positions.
Open tool — JavaScript Regex TesterMarkdown to HTML
Convert a Markdown draft to an HTML fragment, inspect the source and inert preview, then copy or download it.
Open tool — Markdown to HTMLText Sorter
Sort lines alphabetically by a chosen language or by Unicode code point, keeping duplicates, blank rows and complete line contents.
Open tool — Text SorterRemove Duplicate Lines
Keep the first copy of each exact text line, preserving order, significant spaces and blank rows, then copy or download the result.
Open tool — Remove Duplicate LinesText Diff Checker
Compare two drafts locally, with exact whole-line changes, visible whitespace rules and clear final-newline handling.
Open tool — Text Diff CheckerCase Converter
Convert text to uppercase, lowercase, capitalized words or sentence case with explicit letter rules.
Open tool — Case ConverterHTML Entity Encoder/Decoder
Encode or decode literal HTML references with explicit context, Unicode options and LF output, without parsing or rendering markup.
Open tool — HTML Entity Encoder/DecoderMarkdown Table Generator
Edit a small literal-text table, set alignment and copy GFM Markdown or import tab-separated text.
Open tool — Markdown Table GeneratorQuery String Parser & Builder
Edit ordered URL parameters, retain repeated names and copy a normalized query or HTTP(S) URL.
Open tool — Query String Parser & BuilderURL Encoder & Decoder
Convert a UTF-8 URL component or form value with explicit space and plus rules, then copy or download the result.
Open tool — URL Encoder & DecoderBase64 Encoder & Decoder
Encode UTF-8 text as standard or URL-safe Base64, or decode either format with clear errors and complete text output.
Open tool — Base64 Encoder & DecoderXML Formatter
Check namespace-aware XML 1.0, format or compact locally, and copy or download UTF-8 output.
Open tool — XML FormatterJSON Formatter & Validator
Check JSON syntax, format or minify locally, and copy or download output while preserving original data tokens.
Open tool — JSON Formatter & ValidatorSMS Character Counter & Segment Calculator
See how your message is encoded, where its segments end and what it may cost. Your text stays in your browser.
Open tool — SMS Character Counter & Segment CalculatorSocial Media Character Counter
Check platform-specific limits and split posts without losing text.
Open tool — Social Media Character CounterCharacter Counter
Count characters, words, sentences and paragraphs. Check word density, reading time and UTF-8 size, all in your browser.
Open tool — Character CounterText Size Calculator
Compare text encodings and payload sizes in your browser.
Open tool — Text Size CalculatorFancy Text Converter
Convert supported fancy Unicode letters to normal text locally. Keep case, accents, emoji and your original text.
Open tool — Fancy Text ConverterGarbled Text Fixer
Fix garbled text and repair broken accents with a browser-based mojibake fixer. Review each possible UTF-8 reversal before applying it.
Open tool — Garbled Text FixerGmail Clipping Checker
Measure email HTML bytes in UTF-8, compare them with an advisory 102,000-byte Gmail reference, and inspect size contributors locally.
Open tool — Gmail Clipping Checker