You've copied text from a PDF, an email, or a website, and it's full of hard line breaks in the middle of sentences. Every line ends prematurely. Pasting it into a document or form looks terrible. Here's how to fix it instantly.
How to remove line breaks
- Open Remove Line Breaks
- Paste your text into the input area
- Choose your mode — remove all line breaks, or just remove extra line breaks (preserving paragraph spacing)
- Copy the cleaned text from the output
Done. Your text is now a continuous paragraph (or properly separated paragraphs, if you preserved paragraph breaks).
"Remove all" vs "Remove extra"
This is the most important choice:
Remove all line breaks joins every line into a single continuous block. Use this when the source text has a hard break at the end of every line (common when copying from PDFs or fixed-width email clients) and you want it to reflow naturally.
Remove extra line breaks collapses runs of multiple blank lines into a single paragraph break while joining lines within paragraphs. Use this when your text has the right paragraph structure but has unwanted single line breaks within sentences.
Most of the time, "remove extra" is what you want. It fixes the mid-sentence breaks while keeping your paragraphs separate.
Where do these line breaks come from?
PDF files are the biggest culprit. PDFs store text as positioned glyphs, not flowing paragraphs. When you copy text from a PDF, your system inserts a line break at the end of every visual line — even in the middle of a sentence.
Other common sources: email clients that wrap at 72 or 80 characters, plain text exports from legacy systems, OCR output from scanned documents, and text copied from terminal/console windows.
Cleaning up text for other uses
After removing line breaks, you might want to:
- Count the words with Word Counter
- Change the casing with Case Converter
- Find and replace specific strings with Find & Replace
All of these run in the browser — paste, transform, copy, move on.
If the copied content is JSON, do not remove its line breaks blindly. JSON allows whitespace, and a missing comma or quote is a different problem. Use the JSON Formatter to validate and reformat structured data instead.
Examples: before and after
Text copied from a PDF often looks like this:
The committee reviewed the proposal and
concluded that the schedule was too
ambitious for the available budget.
A revised plan will be circulated next week.
With Remove extra line breaks, the lines inside each paragraph are joined and the blank line between the paragraphs is kept:
The committee reviewed the proposal and concluded that the schedule was too ambitious for the available budget.
A revised plan will be circulated next week.
With Remove all line breaks, everything becomes one block, including the paragraph break. That is right for a single sentence or a form field, and wrong for a multi-paragraph document.
Cases that need extra care
Lists and addresses. A mailing address, a poem or a bulleted list needs its line breaks. Run only the lines that are really broken mid-sentence through the tool, and leave the rest alone.
Hyphenated words at the end of a line. PDFs often split a long word across two lines with a hyphen, as in "recom-" then "mendation". Joining the lines gives "recom- mendation" with a stray space. After cleaning, search for a hyphen followed by a space and fix any that were really one word.
Code and structured data. Line breaks in source code, CSV and JSON can be meaningful. Joining the lines of a CSV merges rows into one, and a comment at the end of a line can swallow the code after it. Use a formatter for those formats rather than a line-break remover.
Different line endings. Windows files end lines with a carriage return and a line feed, older Mac files with a carriage return only, and Linux with a line feed. A good cleaner treats all three the same; if you still see odd gaps after cleaning, the text may contain non-breaking or invisible characters that need a Find and Replace.
If you need a different result
- To turn line breaks into something else, such as a comma separated list, use Find & Replace and replace the line break with a comma and a space.
- To check the size of what you cleaned, paste it into the Word Counter.
- To make a title or a URL-safe name out of cleaned text, the Text to Slug tool lowercases it and joins the words with hyphens.
Will this remove my paragraph breaks too?
Only if you choose "Remove all." If you choose "Remove extra," paragraph breaks are preserved — only the unwanted mid-sentence breaks are removed.
Can I remove line breaks from a whole document?
You can paste a document into the tool, but the practical amount of text depends on your browser and available device memory. For very large documents, work in sections and verify the result before replacing the source.
Why does text copied from PDFs have so many line breaks?
PDFs don't store text as flowing paragraphs. They store each character at a specific position on the page. When you copy text, your PDF viewer inserts a newline character at the end of every visual line — even in the middle of sentences. The original document's paragraph structure is lost.
Is there a keyboard shortcut to remove line breaks?
In most text editors, Find & Replace with regex can do this (\n replaced with a space). But if you don't want to mess with regex, the Remove Line Breaks tool does it in one click.