Text on a single line

Paste a multi-line text and join it into one continuous line, without line breaks.

What to clean, in the order it is done

Your text stays in your browser: nothing is saved or sent anywhere.

The real case: text that arrives broken up

An address copied from a website, a sentence lifted from a PDF, a title pasted out of an email: they arrive split across several lines, and in a form field, a spreadsheet cell or inside a post that split is a nuisance or isn't even allowed. Here the line breaks disappear all at once and the text goes back to a single line, ready to paste wherever you need it.

What it does exactly

Every line break becomes a space, and a blank line leaves nothing more: two paragraphs separated by a blank line become two pieces separated by a single space. With the «Remove extra spaces» box, which starts ticked here, runs of spaces inside the lines are also reduced to one and those at the start and end disappear. The text is not touched in any other way: letters, accents, punctuation and emojis stay identical.

Two things to know first

First: the split into paragraphs is lost, and it can't be recovered. If the text was divided into meaningful blocks, afterwards it's one single block: it's worth doing this one piece at a time rather than on a whole document.

Second: if the text comes from a laid-out PDF, words are often broken by a hyphen at the end of a line («conve-\nnience»). Putting everything on one line leaves the hyphen in the middle of the word. That case has a page of its own, which stitches the words back together instead of merely joining the lines: Fix text copied from a PDF.

Several clean-ups at once, in a fixed order

Below the box you will find all ten clean-ups of this family, and you can tick as many as you like: each page starts with its own already ticked. The program is the same on all ten, so the same text with the same boxes gives the same result on whichever page you paste it.

The order does not depend on which boxes you tick, and it is the order you see them in: first the characters (emojis, accents, numbers, punctuation), then the spaces inside each line (tabs, indentation, extra spaces), then whole lines (blank and duplicate) and last of all joining everything into one line. So a line that is left empty once the emojis are gone disappears with the blank lines, and two lines that become identical once the spaces are gone count as duplicates.

The sister pages, each with its own box already ticked: Remove extra spaces, Remove indentation, Remove blank lines, Remove duplicate lines, Remove emojis, Remove accents, Remove punctuation, Remove numbers and Tabs to spaces.

Nearby tools

If all you need is to drop the extra empty lines while keeping the split into lines, there is Remove empty lines; for double spaces between words, Remove extra spaces. In the opposite direction, to put every entry on its own line with a bullet in front, there is Lines to a list.

Related tools