How to use it
- Paste your text
Type, paste, or drop a .txt file into the editor. Long documents are fine.
- Choose what to remove
Remove line breaks joins lines; turn on "Keep paragraphs" to keep blank-line breaks. Remove extra spaces squashes doubles and tabs.
- Copy or download
Copy the result, download it as a .txt file, or press Undo to go back a step.
Why copied text breaks
A PDF does not store paragraphs. It stores lines of text at fixed positions on the page, so when you copy from it you get a hard line break at the end of every printed line. Emails wrapped at 72 or 76 characters and text from OCR have the same problem. Pasted into a document or a form, the sentences come out chopped.
What this tool does
- Remove line breaks joins every line with a space (or nothing, or a comma). Words split by a hyphen at the end of a line, such as
exam-/ple, are put back together; numbers like2020-/2021are left alone. - Keep paragraphs joins lines inside a paragraph but keeps the blank line between paragraphs.
- Remove extra spaces turns runs of spaces, tabs and non-breaking spaces into one space and trims every line.
- Remove empty lines deletes blank lines without joining the rest.
Joining a list into one line
Set "Join with" to a comma to turn a column of values into a, b, c, for example to paste into a spreadsheet formula or an email. To put quotes or other text around each line first, use sort lines, which has an "Add to each line" option. Repeated lines? Remove duplicates first.