Remove Empty Lines
Remove blank and whitespace-only lines while retaining the content of other lines.
Result
How to use Remove Empty Lines
- Paste your source text in the input box.
- Select Convert to generate the output.
- Review the output before copying it.
How it works
Remove blank and whitespace-only lines while retaining the content of other lines. Keep each line whose trimmed content contains at least one character.
Formula or processing rules
Keep each line whose trimmed content contains at least one character.
Worked example
An empty row and a row containing only spaces disappear from between alpha and beta.
| Measure | Value |
|---|---|
| Source text | alpha beta |
| Result | alpha beta |
Pros and cons
Pros
Remove blank and whitespace-only lines while retaining the content of other lines. The sample provides an immediate check of the expected output.
Cons
Indentation on nonblank lines remains intact.
Troubleshooting
Check the input format and compare your case with the built-in sample. Indentation on nonblank lines remains intact.
Frequently asked questions
How do I use the text I get back?
Copy the output into the document, list, or compatible tool where you need it.
How does the transformation work?
Keep each line whose trimmed content contains at least one character.
Can I try a sample first?
An empty row and a row containing only spaces disappear from between alpha and beta.
What should I check before using the result?
Indentation on nonblank lines remains intact.
Is my input stored by the tool?
The transformation is computed in the open page. The tool does not save the submitted text.