Remove Line Breaks and Clean Up Lines
Join broken lines into paragraphs, delete empty or duplicate lines, sort lines or trim extra spaces.
Text tools
Paste text copied from a PDF, an email or a spreadsheet, pick what to do with the lines and copy the cleaned result.
This tool lets you remove line breaks from pasted text and tidy up lists line by line. Eight actions join broken lines into paragraphs, delete empty or duplicate lines, sort or reverse the order, and trim stray spaces. Paste up to 100,000 characters and copy the cleaned result.
Two ways to remove line breaks
Text copied from a PDF or an email often has a hard break at the end of every line. Join lines, keep paragraphs turns single breaks into spaces and keeps blank lines as paragraph boundaries. Take this input:
“This line was / broken in the / wrong places.” then a blank line, then “Second paragraph / here.”
The result is two paragraphs: “This line was broken in the wrong places.” and “Second paragraph here.”, with one blank line between them.
Join everything returns a single line, with every break replaced by a space. Words split by a hyphen at a line end are not repaired: “exam-” then “ple” becomes “exam- ple”.
Cleaning and reordering lists
- Remove empty lines: drops lines that are blank or contain only spaces.
- Remove duplicate lines: keeps the first copy of each line and removes later ones.
- Sort A to Z and Sort Z to A: alphabetical order, ignoring upper and lower case; empty lines are dropped.
- Reverse order: the last line becomes the first.
- Trim extra spaces: runs of spaces or tabs become one space, and spaces at the start and end of each line are removed.
To chain two actions, copy the result, paste it back as the input and pick the second one.
Details that affect the result
Duplicate checking ignores spaces at the ends of a line but not capital letters. “apple” and “apple ” count as the same; “Apple” and “apple” do not. Run the list through the case converter first to merge them.
Sorting compares lines as text, so 10 comes before 2. A list of banana, Apple, cherry sorts to Apple, banana, cherry because case is ignored.
Reverse order flips the sequence of lines, not the letters inside them. To spell text backwards, use the mirror text generator.
Before and after cleaning
Web text can carry invisible characters that make identical-looking lines fail to match; the Unicode text inspector finds them. Styled letters from the copy and paste fonts on this site pass through every action unchanged.
Once the text is clean, the character counter gives its length, and the full set of utilities is on the text tools hub.
Line break remover FAQ
How do I remove line breaks but keep my paragraphs?
Choose Join lines, keep paragraphs. It needs a blank line between paragraphs to know where each ends. Without blank lines, everything is joined into a single block.
Does removing duplicate lines change the order of my list?
No. Lines stay in their original order and only later copies are taken out. For an alphabetical list, run Sort A to Z on the result afterwards.
Why are my numbers sorted in the wrong order?
Lines are compared as text, so 100 sorts before 20 because 1 comes before 2. Padding with leading zeros, such as 020 and 100, gives the expected order.
Is the text I paste here stored anywhere?
No. The actions run in your browser and the text is not uploaded. The page only remembers which action you last picked, so reloading clears your text but keeps that choice.
