Remove Line Breaks
Strip unwanted line breaks and carriage returns from text copied from PDFs, emails, or other formatted sources.
Related Tools
How to Use
- Paste Your Text — Paste text that contains unwanted line breaks — from PDFs, emails, chat logs, or other sources.
- Select Break Handling — Keep paragraph breaks (the default) to merge wrapped lines while leaving blank-line paragraph gaps, or remove all line breaks. Smart mode keeps list items on their own lines, and an option rejoins words hyphenated across lines.
- Copy Merged Text — Click Remove Breaks, review the result, and copy or download the text. Undo restores your original text.
About Remove Line Breaks
Remove Line Breaks joins hard-wrapped lines back into normal paragraphs. Text copied from a PDF, a plain-text email, subtitles or terminal output often has a line break at the end of every visual line, and pasted into a document or form it stays chopped up. This tool replaces those breaks with spaces while keeping the blank lines that separate paragraphs, or removes every break to give you a single line for a spreadsheet cell, CMS field or character-limited input.
How it works
- Keep paragraph breaks (default): a blank line, or a line containing only spaces, marks a paragraph boundary. Inside each paragraph the lines are trimmed and joined with a single space. Several blank lines in a row become one, so paragraphs end up separated by exactly one blank line.
- Remove all line breaks: every non-empty line is trimmed and joined with a space, and blank lines disappear, giving one continuous line.
- Smart mode (on by default, paragraph mode only): a line that starts with a bullet (- * • ◦ ▪ ‣ ·) or a number of up to three digits followed by a period or parenthesis and a space begins a new line instead of being joined. Wrapped continuation lines are still joined to the item above.
- Rejoin words split by a hyphen (off by default): when a line ends with a letter and a hyphen and the next line starts with a lowercase letter, the hyphen is removed and the halves are joined, so exam- and ple become example.
- CR, LF and CRLF line endings are all recognized. Your text is replaced with the result, the summary says how many breaks were removed, and Undo brings back the original.
Worked examples
In this table, ⏎ marks a line break.
| Input | Settings | Output |
|---|---|---|
The quick brown fox jumps over⏎the lazy dog. This is an exam-⏎ple of wrapped text.⏎⏎Second paragraph starts⏎here. | Keep paragraph breaks | The quick brown fox jumps over the lazy dog. This is an exam-ple of wrapped text.⏎⏎Second paragraph starts here. |
| Same text | Keep paragraph breaks + rejoin hyphenated words | … This is an example of wrapped text.⏎⏎Second paragraph starts here. |
| Same text | Remove all line breaks + rejoin hyphenated words | The quick brown fox jumps over the lazy dog. This is an example of wrapped text. Second paragraph starts here. |
Shopping list:⏎- eggs⏎- milk and⏎ butter⏎1. first step | Smart mode on | Shopping list:⏎- eggs⏎- milk and butter⏎1. first step |
| Same list | Smart mode off | Shopping list: - eggs - milk and butter 1. first step |
Limitations
- Rejoining can't tell a split word from a real hyphenated compound: well- / known becomes wellknown. With the option off, a line-end hyphen is kept and the two lines are joined without a space (well-known, but also exam-ple), so check hyphens either way. When the next line starts with a capital letter or a digit, as in COVID- / 19, the hyphen is always kept (COVID-19).
- Smart mode can mistake a wrapped sentence for a list item when the next line happens to start with a number and a period, such as "3. That was all", and keep it on its own line. Turn Smart mode off for prose without lists.
- Indentation is not used as a signal: indented lines and code are joined like any other line, and their leading spaces are removed. Spaces inside a line are not collapsed; follow up with Remove Extra Spaces if needed.
- Paragraphs that a PDF separates with no blank line cannot be told apart and are merged into one.
When to use it
Fix quotes copied from PDF reports and e-books before pasting them into an essay or slide. Reflow plain-text emails, which are often hard-wrapped at around 72 to 78 characters per line. Turn a multi-line address or list into one line for a spreadsheet cell or form field. Clean up subtitles and OCR output, where every line ends with a break. If you only want to delete the blank lines and keep the rest, use Remove Empty Lines. The guide How to Remove Line Breaks and Join Text Into One Paragraph explains the different line break characters and where unwanted breaks come from.
The text is processed in your browser and is never uploaded.
Frequently Asked Questions
What is the difference between a line break (LF) and a carriage return (CR)?
A line feed (LF, \n) moves the cursor down one line and is the standard line ending on Unix, Linux, and macOS. A carriage return (CR, \r) moves the cursor to the beginning of the line and was used by classic Mac OS. Windows uses both together (CR+LF, \r\n). This tool handles all three conventions.
Will removing line breaks merge all my paragraphs into one?
No. The default mode replaces single line breaks with spaces while preserving blank lines (paragraph separators); several blank lines in a row become one. This merges wrapped lines within a paragraph but keeps paragraphs separate. A second mode removes all line breaks entirely, producing a single continuous block of text.
Why does text copied from a PDF have line breaks in the middle of sentences?
PDFs store text as positioned blocks rather than flowing paragraphs. When you copy text from a PDF, each visual line becomes a separate text line with a hard line break at the end. This tool joins those fragmented lines back into proper sentences and paragraphs.
Can I use this tool for email formatting?
Yes. Many email programs hard-wrap plain-text messages at around 72 to 78 characters per line; RFC 5322, the Internet message format standard, says lines should be no longer than 78 characters. When you paste such text elsewhere, these hard-wrapped lines look fragmented. This tool merges them back into flowing paragraphs.
Does it handle text with mixed line ending styles?
Absolutely. The tool normalizes CR, LF, and CR+LF line endings before processing, so text from any operating system is handled correctly regardless of its origin.
Will it affect indented lines or bullet points?
With smart mode switched on (the default), lines that begin with a bullet (-, *, •) or a number followed by a period or parenthesis (1. or 1)) stay on their own lines, while wrapped continuation lines are still joined to the item above. Indentation itself is not used as a signal, and leading spaces on joined lines are removed. Smart mode does not apply in "Remove all line breaks" mode.