
Paste text or open a file. The fixed version shows up here as you type.
Runs entirely in your browser. Your text is never uploaded.
This line break fixer repairs text that breaks in the wrong places. Paste text copied from a PDF, an email or a website, and it joins lines that were wrapped mid-sentence back into proper paragraphs, rejoins words split with a hyphen, and keeps the breaks that belong there, like headings, list items and sign-offs. It can also remove every line break, convert Windows and Mac line endings, and turn literal \n text or <br> tags into real line breaks. The result updates as you type.
How to fix line breaks
- Paste your text into the left box, use Open file, or drag a text file onto the box.
- Pick a Mode. Fix wrapped lines rebuilds paragraphs, Remove all line breaks puts everything on one line, and Only fix line endings leaves your lines alone.
- Check the result. The faint
↵marks show where each line now ends, and the Changes tab shows which lines were joined, edited or removed. - Copy the text or download it as a file.
The three modes
| Mode | What it does | Best for |
|---|---|---|
| Fix wrapped lines | Joins lines inside each paragraph, so a sentence that was split across lines becomes one line again. Blank lines between paragraphs, list items and short lines keep their breaks. | Text copied from PDFs, emails, e-books, old text files and terminal output |
| Remove all line breaks | Joins every line into a single line, with one space where each break was. Blank lines are removed too. | Pasting text into a form field, a spreadsheet cell, a CSV value or a single-line setting |
| Only fix line endings | Keeps every line as it is and only converts the line endings, trims spaces and handles blank lines as you choose. | Code, config files and data, where each line matters |
What each option does
| Option | What it does |
|---|---|
| Rejoin split words | Joins words that were split across two lines with a hyphen, so improve- and ments become improvements. Words that normally have a hyphen, like well-known, self-made and state-of-the-art, keep it. |
| Keep short lines | Keeps the line break after lines that are much shorter than the rest, such as headings, “Hi Sam,” and the last line of a paragraph. Turn it off to join every line in a paragraph. |
| Trim trailing spaces | Removes spaces and tabs at the end of each line. |
| Blank lines | Keeps blank lines, collapses runs of them into one, or removes them all. |
| Line endings | Sets the line endings of the result. LF is used by Linux, macOS and the web, CRLF by Windows, and CR by Macs from before 2001. |
| Unescape \n | Turns literal \n, \r\n and \t text into real line breaks and tabs. A doubled \\n stays as the text \n. |
| <br> to line breaks | Turns <br>, <br/> and <br /> tags into real line breaks. |
| Add <br> tags | Ends each line with <br>, so the breaks show up when you paste the text into HTML. |
Before and after
Text copied from a PDF:
Our team finished the migration in March, two weeks ahead of sched- ule. Query times dropped by half. Thanks, Dana
With Fix wrapped lines and the default options:
Our team finished the migration in March, two weeks ahead of schedule. Query times dropped by half. Thanks, Dana
The paragraph is one line again and sched-ule is back to schedule. “Thanks,” is much shorter than the wrapped lines, so it keeps its break.
Why text breaks in the wrong places
PDFs don’t store paragraphs. They store lines of text placed on a page, so copying from a PDF gives you a hard line break at the end of every printed line. Plain-text emails are often wrapped at 72 or 76 characters for the same reason, and so are old text files, man pages and terminal output. This tool works out how wide the lines were wrapped, and only joins lines that run close to that width.
LF, CRLF and CR line endings
Every line break is stored as one or two invisible characters, and different systems use different ones:
| Ending | Characters | Used by |
|---|---|---|
| LF | \n | Linux, macOS, most code, Git repositories and the web |
| CRLF | \r\n | Windows, Notepad, many CSV exports and email |
| CR | \r | Classic Mac OS (before OS X) and some old exports |
Mixed or unexpected endings cause stray ^M characters in Linux tools, scripts that fail with bad interpreter, Git diffs where every line looks changed, and text that runs together in Notepad. The tool shows which endings your text uses in the input header, warns you when they’re mixed, and converts them all to the one you pick. It also turns rare separators, like the Unicode line separator U+2028 and form feeds, into normal line breaks.
Fixing \n and <br> in copied text
Text copied out of JSON, API responses, log files or source code often shows line breaks as the two characters \n. Text copied from HTML can have <br> tags instead. When the tool finds either one, it shows a note above the result with a button that converts them. These are off by default, because a file of code or documentation might mention \n on purpose.
Frequently asked questions
How do I remove all line breaks from text?
Set Mode to Remove all line breaks. Every line is joined with a single space, and the result is one long line you can paste anywhere.
Why are some of my lines still separate?
Lines much shorter than the rest keep their break, since they’re usually headings, greetings or the end of a paragraph. Lines that start with a bullet or a number, like -, • or 1., are kept as list items. Turn off Keep short lines to join every line in a paragraph, or use Remove all line breaks.
Will it remove hyphens that should be there?
Only hyphens at the very end of a line are checked, and only when the next line starts with a lowercase letter. Common prefixes like well-, self-, non- and half- keep their hyphen. A word like co-worker split right at its hyphen can still lose it, so check the Changes tab, or turn off Rejoin split words.
What do the ↵ marks in the result mean?
They show where each line ends in the fixed text, so you can see the breaks at a glance. They’re only on screen, and aren’t included when you copy or download.
Does copying keep CRLF line endings?
Not always. Browsers and operating systems can change line endings on the clipboard. If the exact line endings matter, for a script or a config file, use Download, which saves them exactly as chosen.
Is my text uploaded anywhere?
No. Everything runs in your browser, and your text never leaves your device. Only your option choices are remembered in your browser.
