Text copied from PDFs
Copying from a PDF often keeps the line ends of the printed layout. Join them to get a normal paragraph, and turn on hyphen joining for split words.
13 case formats in one text box. Paste, click, copy.
Turn plain words into tiny, raised, mirrored and symbol text you can paste anywhere.
No-fuss tools for age, sleep, time and money, plus a strong password maker.
Paste text with broken lines and get one clean line. Join with a space, comma or pipe, keep your paragraphs if you want to, and copy the result as plain text, a JSON string or a CSV cell.
Last updated: October 30, 2026
Handles Windows, Mac and Linux line endings and the Unicode line and paragraph separators. Your text never leaves your browser.
A paragraph to single line converter removes the line breaks from text and joins everything into one line. You paste text that is split across many lines, and it returns the same words on one line, with a space, comma or other separator where each break was.
It fixes text copied from PDFs, emails and chats, turns lists into one line, and prepares text for forms, spreadsheets and code. Unlike a plain find and replace, it handles Windows, Mac and Linux line endings, can keep your paragraphs, and can output a JSON string or CSV cell.
If the text also carries styling from a document, run it through Remove Text Formatting first. To fix capitals afterwards, use the sentence case converter or the case converter.
| Option | You paste | You get |
|---|---|---|
| Default: join with a space | This is a paragraph that was broken across lines. | This is a paragraph that was broken across lines. |
| Windows line endings | line one\r\nline two | line one line two |
| Unicode line separator | one\u2028two | one two |
| Comma and space | apples oranges bananas | apples, oranges, bananas |
| Pipe | a b c | a|b|c |
| Keep paragraph breaks | First line continues here. Second paragraph also wraps. | First line continues here. Second paragraph also wraps. |
| Join hyphenated words | an inter- national team | an international team |
| Remove duplicate lines | red blue red green | red,blue,green |
| JSON string | He said "hi" then left | "He said \"hi\" then left" |
| CSV cell | He said "hi" then left | "He said ""hi"" then left" |
It takes four steps and works for any amount of text.
Paste text with line breaks, or open a .txt file. Text copied from PDFs, emails, chats and spreadsheets all work.
Pick a space, comma, pipe or custom text. Turn on Keep paragraph breaks if blank lines separate paragraphs you want to keep.
Choose plain text, a JSON string or a CSV cell. The result updates as you change an option.
Press Copy result or save a .txt file. Your original text stays in the input box.
Each option changes one thing, so you can combine them to match the text you have.
| Option | What it does | Example |
|---|---|---|
| Join lines with | The text placed where each line break was. Space is best for sentences, and comma or pipe suits lists. | a, b, c |
| Keep paragraph breaks | Joins the lines inside each paragraph but keeps one blank line between paragraphs. | Paragraph one. Paragraph two. |
| Join words split by a hyphen | When a line ends with a hyphen after a letter and the next line starts lowercase, the two parts are joined without the hyphen. | inter- national becomes international |
| Collapse repeated spaces | Replaces runs of spaces or tabs with one space inside each line. | a b becomes a b |
| Trim every line | Removes spaces at the start and end of each line before joining. | text becomes text |
| Remove duplicate lines | Keeps the first copy of each repeated line. Useful for lists. | red, blue, red becomes red, blue |
| Output as | Plain text, a JSON string with quotes and escapes, or a CSV cell with doubled quotes. | "He said ""hi""" |
Different systems end lines with different characters. The converter treats all of these as line breaks.
| Name | Character | Where it is used |
|---|---|---|
| LF | \n | Unix, Linux and modern macOS |
| CRLF | \r\n | Windows |
| CR | \r | Classic Mac OS |
| NEL | U+0085 | Unicode next line; software handles it inconsistently |
| LS | U+2028 | Unicode line separator; treated as a line terminator by ECMAScript |
| PS | U+2029 | Unicode paragraph separator; treated as a line terminator by ECMAScript |
| VT and FF | \v and \f | Rare control characters this tool also treats as line breaks |
Source: Wikipedia, Newline.
It saves the most time when the lines were broken by a layout, not by you.
Copying from a PDF often keeps the line ends of the printed layout. Join them to get a normal paragraph, and turn on hyphen joining for split words.
Remove forced line wraps from quoted emails or chat logs before you paste them into a document or form.
Turn one item per line into a comma, semicolon or pipe separated line for tags, keywords or a spreadsheet cell.
Put multi-line addresses or notes on one line, or output them as a CSV cell with the quotes already escaped.
Output a JSON string to paste into code, config files or an API request without escaping quotes by hand.
Flatten text for form fields, social bios or tools that do not accept line breaks.
You can do the same in other tools. These are the quickest ways.
Press Ctrl+H, put ^p (paragraph mark) or ^l (manual line break) in Find what, a space in Replace with, then Replace All. See the Word MVP guide to special characters.
Use =SUBSTITUTE(SUBSTITUTE(A1,CHAR(13),""),CHAR(10)," ") to turn the line breaks in a cell into spaces. In Excel for Windows you can also press Ctrl+J in the Find box. See the SUBSTITUTE function.
Search with a regular expression that matches \r\n|\r|\n and replace it with a space. The code on this page does the same in JavaScript and Python.
Match all three line endings with one regular expression, with the Windows \r\n first so it is not counted twice. The MDN page on replace explains the g flag, and the Python re documentation covers re.sub.
// JavaScript const oneLine = text.replace(/\r\n|\r|\n/g, " "); # Python import re one_line = re.sub(r"\r\n|\r|\n", " ", text)
Joining lines is a mechanical rule. These limits explain the few places where you should check the result.
When there are no blank lines, a tool cannot tell a wrapped line from a deliberate one. Leave Keep paragraph breaks off and everything becomes one line.
A line ending in a real hyphen, such as well- followed by known, becomes wellknown. Use it for hyphenated line wraps and review the result.
Collapse and Trim only touch spaces and tabs. Other invisible characters, such as zero-width spaces, are left as they are.
Joining with Nothing glues words together. Use it only for data such as codes, not for sentences.
The JSON option escapes quotes and backslashes the way JavaScript does. Check the result in the tool that will read it.
The tool runs in your browser, so very large files may be slow on an old device.
The line-ending facts and code on this page follow the sources below. Last reviewed: October 30, 2026. Every example in the table above was run through the converter before publishing.
Need a different format? These tools work the same way: open, paste, copy.
Short answers to what people ask most about removing line breaks.
A paragraph to single line converter removes the line breaks from text and joins everything into one line. This one lets you choose the joiner, keep paragraphs, and copy the result as plain text, a JSON string or a CSV cell.
Paste your text into the box above. The line breaks are replaced with a space straight away, and you can copy the result or download it as a .txt file. Change the Join lines with option for a comma, pipe or custom text.
A line break moves text to the next line. A paragraph break usually means an empty line between blocks of text. Turn on Keep paragraph breaks to join the lines inside each paragraph and keep the blank line between paragraphs.
Turn on Keep paragraph breaks. Each paragraph becomes one line, and one blank line stays between paragraphs.
Copying from a PDF often keeps the line ends of the printed layout. Paste it here, turn on Join words split by a hyphen for words broken across lines, and use Keep paragraph breaks if blank lines separate paragraphs.
Paste one item per line and set Join lines with to Comma or Comma and space. Turn on Remove duplicate lines if the list repeats items.
They are the codes for line breaks. \n (LF) is used by Unix, Linux and modern macOS, \r\n (CRLF) by Windows and \r (CR) by classic Mac OS. See the Wikipedia article on newlines. This tool handles all three and the Unicode line separators.
In Word, open Find and Replace and search for ^p for paragraph marks or ^l for manual line breaks, replacing with a space. In Excel, use =SUBSTITUTE(SUBSTITUTE(A1,CHAR(13),""),CHAR(10)," ") or Find and Replace with Ctrl+J in the Find box. See the Microsoft SUBSTITUTE guide.
Yes, by default. Collapse repeated spaces and Trim every line are on, so runs of spaces become one space and the ends of each line are cleaned. You can turn both off.
Yes. Set Output as to JSON string for a quoted, escaped string, or CSV cell for a quoted value with doubled quotes. Check the result in the tool that reads it.
No. The conversion runs in your browser using JavaScript, so your text is not uploaded or stored. There is no character limit and no sign-up.