🔧 TL3 Tools

Live demo (works without JavaScript):

Sample input — paste anything and watch the result update.
→ Join lines
Sample input — paste anything and watch the result update.

↩️ Remove Line Breaks

Written by Jane Smith · Reviewed by Sarah Mitchell · July 25, 2026

Paste your text below to remove all line breaks, turning multi-line text into a single paragraph.

Input

Output

Why Multi-Line Text Gets in the Way

A block of text copied out of a PDF or an email client often arrives as a stack of short lines, one per sentence or even one per wrapped word. This page turns that stack into a single continuous line: every line break becomes a space and the surrounding whitespace is tidied in the same pass. The result is a paragraph ready to drop into a search box, a subject line, or a database field that expects one line.

Where the Tool Fits in Your Workflow

The tool earns its keep in three situations. The first is unwrapping text that a PDF viewer split at a fixed column width, where every paragraph became several lines. The second is cleaning up copied chat messages or support tickets that arrived with one line per sentence. The third is preparing a multi-line block for a system that rejects embedded breaks, such as a single-line form field or an email subject header. In all three cases the line endings are noise and the words are the payload. Someone copying a product description out of an internal wiki, an agent pasting a customer note into a one-line field, or an editor assembling a caption from three separate notes is doing the same job this page automates in one click.

Following a Three-Line Conversion

Start with three lines that mix the two common line-ending styles, LF for the first two and a CRLF pair from a Windows file on the third:

Line one
Line two
Line three

The first replacement step matches every break pattern and substitutes a space, so the text becomes three words joined by spaces. The second step then sweeps any run of whitespace into a single space, and a final trim removes stray space at the edges. The output panel shows one line:

Line one Line two Line three

Two blank lines between paragraphs behave the same way: the double break becomes two spaces and then collapses to one, so the whole block reads as a single sentence. A line that ends with a space before the break contributes that space to the run, and the collapse swallows it just as readily.

The Two Regex Passes Under the Hood

Internally the page runs two regular expressions in sequence. The first, /\r?\n|\r/g, matches every style of line ending: the LF used by Unix-like systems, the CRLF pair used by Windows, and the bare CR used by very old Macintosh files. Each match becomes a single space. The second expression, /\s+/g, then collapses every run of whitespace anywhere in the string, including tabs that were already inside the lines, down to one space. A final trim clears any space that ended up at the front or back of the result. The work is a fixed number of passes over the text, so even a very long paste completes in a few milliseconds, and the order of the passes matters: breaking the lines first means the spaces they produce are swept up by the second pass along with everything else.

A Short History of Line Endings

The three break styles exist because early operating systems made different choices. Unix and its descendants, including Linux and macOS, use a single line feed character. Windows inherited the carriage return plus line feed pair from DOS, which in turn copied it from CP/M. The classic Mac OS before OS X used a lone carriage return. Files saved by one system and opened on another can end up with mixed endings, which is exactly why a converter must recognize all three rather than assuming one. Editors on Windows commonly offer to convert endings on save, and version control systems can rewrite them during checkout, so even a single project can produce all three varieties over time. This page does not care which one arrived; each is replaced by a space and the paragraph is assembled regardless.

Boundaries, Tabs, and Word Text

Because the second expression uses the broad whitespace class, the tool does more than join lines. A tab inside a line, a double space, or an accidental space before a break all become single spaces. The same class catches the non-breaking spaces that Word inserts and flattens them to ordinary spaces, which is a real difference from the remove-extra-spaces page, where those characters survive untouched. A file that ends with a trailing newline loses that newline and any blank lines along with it. Emoji and letters from any script are preserved, since they are not whitespace; a Hebrew line, a Chinese sentence, or a smiley in the middle of a paragraph all pass through with their characters intact.

When Joining Lines Is the Wrong Move

This page is the wrong tool whenever the structure of the text carries meaning. A CSV row, a code file, or a list that will be sorted later should never go through it, because the line boundaries are the data. Joining a CSV file would fuse every record into one giant row, and joining a script would turn each statement into a comment-eating single line. If the text only looks wrong in your editor, soft-wrap displays the same content without changing the file at all. For removing extra spaces while keeping every line intact, the remove-extra-spaces page with the line-trim option is the better fit. When a paragraph was split only for display, this page is the right call; when the breaks were typed on purpose, it is the wrong one.

Performance and Privacy

The two passes are both linear in the length of the input, so there is no size threshold beyond which the tool slows down noticeably; a ten-thousand-line export is joined in the same instant as a ten-line note. The conversion runs entirely inside this browser tab, and nothing is transmitted or stored anywhere, so confidential notes, customer messages, and unpublished drafts can be processed without leaving the machine.

Questions People Ask About Joining Lines

Does it merge my paragraphs into one long block?

Yes, and that is the point: every break becomes a space, including the blank lines between paragraphs. Split a long output back apart in your editor by re-wrapping at a set column width.

What about Windows line endings?

The CRLF pair used by Windows files is recognized and replaced like any other break, so pasted Notepad content behaves the same as Unix text.

Will my tabs survive the conversion?

No. The second pass collapses every whitespace run, tabs included, into a single space, so tab-aligned columns are flattened.

Can I put the line breaks back afterwards?

Not with this page. Save a copy of the original before converting, because the download button stores only the joined output.

What if my text has no line breaks at all?

The first pass finds nothing to replace, and the second pass still tidies any double spaces or tabs already in the text, so the output is a cleaned single line.

Is anything uploaded while I work?

The transformation runs entirely inside this browser tab, and nothing is transmitted or stored anywhere.