Clean up text
Trim each line, remove empty or repeated blank lines, collapse extra spaces and remove line breaks, with each step switched on or off.
Your result
Your result will appear here.
About clean up text
Use this on text pasted from a PDF, an email, a spreadsheet or a web page. Such text often arrives with stray spaces, uneven gaps or lines broken in the wrong places. Five repairs are offered, each with its own Yes or No. As the page opens, it trims every line, reduces several blank lines to 1 and collapses repeated spaces. Removing every empty line and joining the lines into one paragraph are off until you choose them.
How it works
StillKit applies the steps you set to Yes in the order shown. It trims whitespace from both ends of each line and drops lines that are empty or hold only spaces. A run of 2 or more blank lines shrinks to 1. It then turns each run of spaces and tabs into a single space. Last, it trims the lines, drops the empty ones and joins the rest with single spaces.
Tips
- Trimming removes indentation as well, which flattens code and nested lists. Set that step to No for such text, or use Remove common indentation to move a block left and keep its shape.
- Tabs, non-breaking spaces and other Unicode spaces count as spaces, so a tab-separated table loses its columns when repeated spaces are collapsed. Leave tables out.
- Joining the lines merges separate paragraphs too, and a word hyphenated at a line end comes out as hy- phen. Wrap text lines with a width of 1000 rejoins lines but keeps paragraphs apart.
- A zero-width space is not whitespace: a line holding only that character looks empty and is kept. Run Remove zero-width characters first if blank-looking lines survive.
- Blank lines at the very start of the text are reduced to 2, not 1, so delete those by hand.
Limits
Maximum 1 MB of input. The steps set to Yes run in the order they are listed. Exact text rules are used; this does not check grammar or meaning.
How tools run on your device →A worked example
Example input
Your text: Meeting notes Bring the signed form. Lunch is at noon. See you there. Trim spaces at the start and end of each line: Yes Remove empty lines: No Keep one blank line where there are several: Yes Collapse repeated spaces: Yes Join the lines into one paragraph: No
Example result
Meeting notes Bring the signed form. Lunch is at noon. See you there.
Questions and answers
Which options remove the blank lines between paragraphs?
Remove empty lines deletes every blank line, which suits a list or a column of values. Keep one blank line where there are several only evens out the gaps, so paragraphs stay apart. With both set to Yes, no blank line is left.
How do I rejoin a paragraph copied from a PDF?
Set Join the lines into one paragraph to Yes. Each line is trimmed and joined to the next with 1 space. Do this for 1 paragraph at a time, because blank lines are dropped and everything becomes a single line.