How to replace newlines
- Paste your text into Input.
- Choose what each line break becomes: a space, a comma, nothing, or your own text.
- Copy or download the result.
What counts as a newline?
Different systems end lines differently. Windows uses a carriage return followed by a line feed (CRLF), while macOS, Linux and the web use a single line feed (LF). Very old Mac files use a lone carriage return (CR). This tool recognises all three, so text pasted from Word, Excel, PDFs, emails or code editors is handled the same way.
Common uses
- Turn a column copied from a spreadsheet into a comma-separated list for a SQL
IN (…)clause. - Fix text copied from a PDF, where every line ends in a hard break mid-sentence.
- Squash a multi-line address or message onto a single line for a form field or CSV cell.
- Join a list of tags, emails or IDs with a custom separator such as
;or|.
Options explained
Trim lines removes spaces and tabs at the start and end of each line before joining, so you don’t end up with double spaces. Remove empty lines skips blank lines instead of producing empty items. Keep paragraphs treats blank lines as paragraph breaks and leaves them in place.