Replace empty lines with a single line break

Please log in or register to do it.

Normalize empty lines with options to remove, replace, or preserve whitespace-containing lines. Set custom replacements or trim spaces. Ideal for cleaning logs, code, and document formatting.

Processing Modes:

Replace multiple empty lines with single line break
Strip out all empty lines completely
Keep lines with spaces/tabs
Replace with:
Remove whitespace before checking lines

Examples:

Basic Replacement

Before:
Line 1\n\n\nLine 2\n\nLine 3
After:
Line 1\n\nLine 2\n\nLine 3

Remove All Empty

Before:
A\n\nB\n\n\nC
After:
A\nB\nC

Preserve Whitespace

Before:
Line 1\n  \n\t\nLine 2
After:
Line 1\n  \n\t\nLine 2

Custom Replacement

Before:
A\n\n\nB
After (with '-'):
A\n-\nB

Trim Whitespace

Before:
Line 1\n  \n\t\nLine 2
After:
Line 1\n\nLine 2
Replace lowercase consonants with uppercase
Replace duplicate words with a single instance

Your email address will not be published. Required fields are marked *