Text · 52 tools · nothing uploads

Remove empty lines

Remove empty lines. Runs entirely on your device, nothing is uploaded.

Input

live

Remove empty lines deletes every line that is empty or holds only whitespace from a pasted text, keeping the rest. A line of spaces or tabs counts as empty and is dropped along with truly blank lines. Any trailing newline in the input is preserved. There is no option to keep a single blank line between paragraphs.

Questions

What counts as an empty line?

A line with zero characters, and also a line holding only spaces or tabs. Both are treated the same way and both are removed; the tool checks with a trim before deciding a line is empty.

Can I keep single blank lines between paragraphs?

No. There is no option to keep a maximum of one blank line; every empty or whitespace-only line is removed, so paragraphs that were separated by a blank line end up directly adjacent.

Does it affect the order of the remaining lines?

No. Every surviving line keeps its original relative order; only the empty ones are filtered out.

What happens to the trailing newline of my file?

It is preserved: the tool notes whether the input ends in a newline before filtering, and reattaches it to the output if so.

Does it collapse the remaining lines together?

No. Surviving lines are joined back with the same single newline between them as a normal file; there is no extra spacing added where an empty line used to sit.

Related Text tools