Remove Line Breaks
Guide: How to Clean Up Text Copied From PDFs and Websites
0 line breaks
Replace each line break with
Nothing you enter or choose here leaves your device. This tool runs in your browser.
The problem with copied text
Text copied from a PDF or an email often has a line break at the end of every visual line, not just at the end of a paragraph. Paste it into a document and every line is chopped off short. Here's an example:
Before: The committee met on Tuesday to review the budget for the coming year. After: The committee met on Tuesday to review the budget for the coming year.
Paste the text in, leave the replacement on a space, and tick Treat several breaks in a row as one. The broken lines join into normal sentences.
Keeping your paragraphs
If you remove every break, a whole document turns into one block. Tick Keep paragraphs instead. Only the breaks inside each paragraph are removed, while blank lines between paragraphs stay. That's the right setting for most articles and reports.
More than cleaning prose
Joining lines with a separator is a quick way to turn a column into a list. Paste a column of ids copied from a spreadsheet, choose A comma, and a stack like this:
1042 1057 1063
becomes 1042,1057,1063, ready to drop into a database query, a search box or a command. Pick My own text for a different joiner, such as a semicolon, a pipe or a comma followed by a space.
| Goal | Replace each break with |
|---|---|
| Fix a PDF paragraph | A space |
| Make a comma-separated list | A comma |
| Build a query list with quotes | My own text, like ',' |
| Squash text for a tweet | A space, with double spaces collapsed |
| Join words with no gap | Nothing |
Hyphens at the end of a line
PDFs often split a long word across two lines with a hyphen, such as exam-ple. Joining lines with a space gives exam- ple. Search the result for a hyphen followed by a space and fix those by hand, or use the find and replace tool to remove them in one go. Be careful with real hyphenated words like well-known.
When not to use it
- Poetry and lyrics. The line breaks are the point.
- Code. Joining lines can change meaning or comment out the rest.
- Addresses and lists. If each line is a separate item, join with a comma instead of a space.
The result is trimmed, and double spaces become one unless you turn that off. Text stays in your browser. To tidy other parts of the same text, try the sort lines tool and the case converter.
Written by Akinrinmade Michael · Updated October 24, 2026
How to use
- 1Paste your text into the box.
- 2Choose what replaces each line break, such as a space.
- 3Copy the cleaned result.
Frequently asked questions
Is my text sent anywhere?
No. Everything runs in your browser, so your text never leaves your device.
How do I fix text copied from a PDF?
Paste it, keep the replacement on a space, and tick Treat several breaks in a row as one. Broken lines then join into normal sentences.
Can I keep my paragraphs?
Yes. Tick Keep paragraphs and only the line breaks inside each paragraph are removed. Blank lines between paragraphs stay.
Can I join lines with a comma?
Yes. Choose A comma, or My own text for any separator you like, such as a pipe or a semicolon.
Does it remove the spaces at the start and end?
Yes. The result is trimmed, and double spaces become one space unless you turn that off.
Read the guide
Learn how this works and how to get the most from it.
Writing & text
How to Clean Up Text Copied From PDFs and Websites
Fix broken line breaks, double spaces and stray characters in copied text, then sort, number and tidy it in a few clicks.
3 min read
Related tools
Find and Replace
Find and replace text online, with regex, case and whole-word options.
Sort & Dedupe Lines
Sort lines A-Z, reverse them, remove duplicates and trim whitespace.
Word Counter
Count words, characters, sentences and paragraphs as you type.
Case Converter
Switch text to UPPER, Title, camelCase, snake_case and more.