Boneyard Tools

Remove Line Breaks From Text

Remove line breaks turns text spread across many lines into a single clean line. It helps when you copy from a PDF, email or code comment and the wrapping comes along for the ride. Choose what replaces each break, collapse repeated spaces, and copy the flattened result.

How to remove line breaks

  1. Paste or type your text into the top box.
  2. Open the 'Replace breaks with' menu and pick Space, Nothing, or Comma and space.
  3. Leave 'Collapse extra spaces' on to squeeze repeated spaces and tabs into one.
  4. Leave 'Trim ends' on to drop leading and trailing whitespace.
  5. Read the single-line result below and click Copy.

Examples

Flatten an email to one line (replace with a space)

Dear team,
Thanks for the update.
Best, Ada
Dear team, Thanks for the update. Best, Ada

Rejoin a hard-wrapped word (replace with nothing)

one
two
three
onetwothree

Turn a stacked list into a sentence (comma and space)

apple
banana
cherry
apple, banana, cherry

Frequently asked questions

What can I replace each line break with?

Three choices: a single space (the default), nothing at all, or a comma followed by a space. A space keeps words readable, nothing is useful for rejoining a split word or token, and comma plus space builds a quick inline list.

Does this also remove extra spaces?

Yes, when 'Collapse extra spaces' is on. Runs of two or more spaces or tabs are reduced to a single space, so joined lines do not leave gaps behind. Turn it off if the exact spacing matters.

Will it clean up text copied from a PDF?

Yes. PDFs often insert a break at the end of every visible line, which chops a paragraph into fragments. Replacing breaks with a space and collapsing spaces stitches the paragraph back into flowing text.

Does it remove blank lines and paragraph breaks too?

Yes. Every line break is replaced, including the empty lines between paragraphs. With space collapsing on, a blank line does not leave a double space, so paragraphs merge cleanly into one line.

Are Windows, Mac and Unix line endings supported?

Yes. Windows CRLF, classic Mac CR and Unix LF endings are all detected and replaced, so it does not matter which operating system produced the text.

What does the 'Trim ends' option do?

It removes any whitespace at the very start and end of the result, so you do not get a stray leading space from a break that sat at the beginning of the text.

Does it change my punctuation or capitalization?

No. Only whitespace is touched. Letters, numbers, punctuation and casing are left exactly as you pasted them.

Is there a length limit?

There is no fixed limit. The work happens in your browser, so the practical ceiling is your device memory. Very large pastes update almost instantly.

Is my text private?

Yes. Everything runs locally in your browser and nothing is uploaded to a server, so sensitive text never leaves your device.

Learn more

Related tools