Remove Line Breaks
Rejoin text that wrapped early, or strip blank lines out of a list. Runs entirely in your browser.
The three modes
| Mode | What it does | Use it when |
|---|---|---|
| Keep paragraph breaks | Joins the lines inside each paragraph, leaves the blank line between paragraphs | Text copied from a PDF, an email or a column layout that wrapped early |
| Remove every line break | Joins the entire text into one continuous line | A URL, a token or a code string split across lines; filling a single-line form field |
| Remove blank lines only | Deletes empty lines, keeps every real line break | Tidying a list that has gaps between items |
Why PDF text arrives broken
A PDF records where each line of type was drawn on the page, not where a sentence ends. Copying from one therefore inserts a hard break at the end of every visual line, and pasting the result into a document gives you prose that stops in the middle of sentences. Keep paragraph breaks is the mode that fixes this: the early breaks disappear, the real paragraph boundaries survive, and the text flows again.
The join-with field
Whatever you put in Join with replaces each removed break. A single space is right for prose. Leave it empty when rejoining something that must not gain a space, such as a long URL or a base64 string that has wrapped. Set it to a comma and a space to turn a column of values into a comma-separated list you can paste into a spreadsheet or a query.
Line endings
Carriage return, line feed and the Windows pair of both are all recognised, so it does not matter whether the text came from Windows, macOS, Linux or a web form. The output uses a plain line feed, which every modern editor reads correctly.
Examples
Rejoining a wrapped paragraph
Text that arrives as four short lines followed by a blank line and four more becomes two flowing paragraphs in Keep paragraph breaks mode, with the blank line between them intact.
Repairing a split URL
An address broken across three lines by an email client rejoins into one working link in Remove every line break mode with the join-with field cleared. Leaving a space in that field would insert spaces into the URL and break it, which is the single most common mistake here.
Turning a column into a list
A column of names pasted from a spreadsheet becomes Ada, Grace, Alan in Remove every line break mode with the join-with field set to a comma followed by a space.
How to use it
Paste into the upper box, pick a mode, and the result appears underneath as you type. Trim spaces on each line removes the leading and trailing spaces that PDF copies usually carry, and Collapse repeated spaces reduces runs of spaces to one, which is worth leaving on unless you are working with text where the spacing is deliberate, such as ASCII tables or indented code.
Questions
What is the difference between removing all breaks and keeping paragraphs?
Remove every break joins the whole text into one continuous line. Keep paragraph breaks joins the lines inside each paragraph but leaves the blank line between paragraphs, which is what you want when text has been pasted out of a PDF and every line has wrapped early.
Why does my text from a PDF have a break on every line?
A PDF stores where each line was drawn on the page rather than where a sentence ends, so copying it inserts a hard break at the end of every visual line. Keeping paragraph breaks rejoins those lines into flowing sentences while preserving the real paragraph boundaries.
Will Windows and Mac line endings both work?
Yes. Carriage return, line feed and the Windows pair of both are all recognised, so text from any operating system is handled the same way.
Can I join lines without adding a space?
Yes. The Join with field sets what replaces each break. Leave it empty to butt the lines straight together, which is what you want for a wrapped URL or a long code string, or set it to a comma and a space to build a list.
Is my text uploaded anywhere?
No. The rewriting happens inside your browser and this tool has no backend, so nothing you paste is transmitted, logged or stored.
Related: Remove Words and Characters for deleting specific content, and Word Counter for length checks. Everything else is on the all tools page.
Related tools
Browse all Sigma Wire tools - every free tool on the site, grouped by category.