How to remove line breaks
Paste your text into Input; the cleaned version appears in Output as you type, with the before-and-after counts underneath — characters, words, lines and how many line breaks were removed. Pick a mode at the top:
- Remove all turns every line break into a separator — a space by default, or nothing, a comma, or any custom string such as
|or\tfor a tab. Use it to make a single line for a spreadsheet cell, a form field or a subject line. - Keep paragraphs joins the lines within each paragraph but keeps the blank lines between paragraphs, so the structure survives.
- Un-wrap PDF / email repairs hard-wrapped text intelligently (see below).
- Line endings only keeps every break and simply converts line endings, together with any clean-up options you tick.
Copy or download the result, or press Use as input to run another pass with different settings. To turn a paragraph into a list instead — one item per line — and sort or dedupe it, use the line counter.
Fixing text copied from PDFs and emails
PDFs store text as positioned lines, not paragraphs, so copying from one gives you a hard line break at the end of every printed line. Plain-text emails are often wrapped at 72–78 characters for the same reason. Remove every break and you lose the paragraphs and lists too; keep them and the text is unusable in a document.
Un-wrap works out the typical line width of your text and then judges each break. A break is treated as a real one — and kept — when the next line starts a list item (a bullet, dash, number or letter followed by a full stop or bracket), when the line ends a sentence well short of the typical width, or when a short line is followed by a capital letter, as with headings. Every other break is a wrap and is joined with a space (or with nothing between Chinese, Japanese or Thai characters, which don’t use spaces). Blank lines always stay as paragraph breaks, and with Indented lines start a new paragraph ticked, a line indented by two or more spaces or a tab — deeper than the lines around it — starts a new paragraph too. That is how most books and many PDFs mark paragraphs; hanging indents in lists are left alone.
Hyphens at line ends are the other PDF problem. In Smart mode a word split across a line break is rejoined — manage-/ment becomes management — but a genuine compound that happened to break at its hyphen keeps it: well-known, self-employed, long-term, e-mail, COVID-19, and names such as Anglo-French. It decides using your own text first (if the word appears elsewhere with or without the hyphen, that spelling wins), then common compound patterns. You can also choose to always remove or always keep the hyphen. Invisible soft hyphens, which some PDFs insert, are always removed. For email replies, tick Remove email quote markers to strip the > and >> at the start of quoted lines before un-wrapping.
CRLF, LF and other line endings
| Name | Characters | Used by |
|---|---|---|
| LF | \n (line feed) | macOS, Linux, Android, iOS, the web, Git |
| CRLF | \r\n (carriage return + line feed) | Windows, Notepad (older versions), many CSV and email standards |
| CR | \r | Classic Mac OS before 2001 |
Every type is read correctly, including Unicode line and paragraph separators and form feeds, which occasionally appear in text exported from Word or PDFs. The output uses LF by default; choose CRLF if the text is going into a Windows-only tool, a strict CSV importer or a system that shows everything on one line. The choice applies to Copy and Download.
Browsers convert line endings to LF the moment text is pasted into a text box, so a paste cannot reveal what the original used. Load a .txt file (or drop one onto the input) instead: the tool reads the file directly and reports whether it uses CRLF, LF, CR or a mixture — a common cause of odd diffs in version control and of CSV rows splitting in the wrong place.
Spaces, tabs, HTML and hidden characters
Remove extra spaces and tabs collapses runs of spaces, tabs and non-breaking spaces into a single space and removes spaces left at the start or end of lines — the debris that justified PDF text and indented emails leave behind. Trim each line removes leading and trailing whitespace before lines are joined, so indentation does not turn into double spaces.
Collapse several blank lines into one tidies text with big gaps between paragraphs, and Remove empty lines deletes every blank line — handy for turning a spaced-out list into one item per line. Both work in every mode, including Line endings only.
Strip HTML tags is for text copied as source code: <br> becomes a line break, closing paragraph, heading and list tags become paragraph breaks, list items get a bullet, scripts and styles are dropped, entities such as & and are decoded, and the empty lines that block tags leave behind are tidied away. The HTML is parsed as inert text in your browser — nothing is fetched or run.
If joined text still looks wrong, it may contain characters you cannot see: zero-width spaces, word joiners or directional marks copied from web pages. The invisible character guide explains what they are, and the character counter will show the difference in length.
Frequently asked questions
How do I remove line breaks but keep paragraphs?
Choose Keep paragraphs. Line breaks inside each paragraph are replaced with a space, while blank lines between paragraphs are kept, so you get one flowing line per paragraph. Paragraphs that start with an indented first line are recognised too. If your text has neither blank lines nor indents, as with many PDFs, choose Un-wrap PDF / email, which recognises paragraph ends from line lengths and punctuation.
Why are there hyphens in the middle of words after I join the lines?
The original was hyphenated at the ends of lines to fit the page. With Smart hyphen handling, a split word is joined back together (manage-ment becomes management), while genuine compounds such as well-known, self-employed or COVID-19 keep their hyphen. If the same word appears elsewhere in your text, that spelling is followed. Choose Always remove or Keep the hyphen if you prefer one fixed rule.
How do I put each line into one comma-separated list?
Choose Remove all, then set Replace line breaks with to Comma and space. Every line becomes an item in a single comma-separated line. For another separator — a semicolon, a pipe or a tab — pick Custom separator and type it; use \t for a tab. Tick Trim each line so stray spaces do not end up inside items.
What is the difference between CRLF and LF?
They are two ways of marking the end of a line. Windows traditionally uses a carriage return followed by a line feed (CRLF); macOS, Linux and the web use a line feed alone (LF). Most modern software handles both, but some older Windows programs and strict importers need CRLF, while Git and Unix tools prefer LF.
Is my text uploaded anywhere?
No. All processing happens in JavaScript in your browser, including HTML stripping and reading a file you load or drop. Your text is never sent to us or stored, apart from your option choices, which are remembered in this browser so the tool opens the way you left it. The page loads the site’s usual analytics and advertising scripts, but your text is not passed to them.
Can I load a text file on my phone?
Yes. Tap Load file at the top of the tool and choose a .txt, .md, .csv or .log file from your phone’s files or cloud storage. The file is read directly in the browser, so its original line endings (CRLF, LF or CR) are reported next to the line-ending setting. Files up to 20 MB are accepted; for larger ones, split the file first.