Free Online Multi-line to One Line Converter
Paste text with line breaks and collapse it into one continuous line. Choose a separator - space, comma, pipe, semicolon, none, or a custom string - and optionally trim lines or drop empty ones.
Handy for turning bullet lists into comma-separated values, fixing copy-paste from emails, building shell one-liners, and cleaning text for JSON strings or chat prompts. Everything runs locally in your browser.
Why Convert Multi-line Text to One Line?
Multi-line text shows up everywhere: copied lists from spreadsheets, bullet points from docs, log snippets, and command output. Many tools and formats expect a single line - CSV fields, JSON string values, shell one-liners, Slack messages, and SQL IN clauses.
Joining lines by hand is slow and error-prone. A dedicated converter lets you paste once, pick a separator, and copy a clean one-liner without hunting for stray newlines or trailing spaces.
Choosing the Right Separator
Use a space when you want readable prose or a simple sentence from line-broken paragraphs.
Use a comma or comma-space for CSV-style lists, tags, and keyword strings. Pipe (|) or semicolon separators work well for shell paths, alternate values, and configs that already use commas.
Choose "none" to concatenate lines with no delimiter - useful for joining split tokens or fixing text that was wrapped mid-word. Custom separators cover anything else: tabs, newlines escaped as \n, HTML <br>, or " AND " for search queries.
Trim, Empty Lines, and Whitespace
Trimming each line removes leading and trailing spaces that often appear when copying from editors or PDFs. Removing empty lines prevents double separators when blank rows sneak into a paste.
"Collapse whitespace" is optional: after joining, it replaces runs of spaces/tabs/newlines with a single space and trims the ends. Turn it on when your source has ragged spacing; leave it off when the separator itself contains intentional spaces (like ", ").
Common Use Cases
Turn a vertical list of emails or usernames into a comma-separated string for forms and scripts.
Convert a multi-line SQL SELECT list or a column of IDs into a single IN (...) argument with commas.
Build one-line curl or docker commands from notes that were written with line breaks for readability.
Flatten chat prompts, README snippets, or scraped text before pasting into APIs that reject control characters.