Free empty line remover
Remove empty lines, including the fake ones
Close the gaps in a list or a draft in one pass: choose whether no blank lines survive, one survives as a paragraph gap, or two do, and a run of six shrinks to whichever you picked. It is free, needs no account and puts no ceiling on the size of the file. The part that matters is the first tick box — a line holding two spaces looks exactly like an empty one and is not, which is why deleting gaps by hand always leaves some behind, and the tool counts how many of those it caught.
- 100% free
- No signup
- Catches whitespace-only lines
- Keeps paragraph gaps
- Any file size
How to remove blank lines from your text
Three steps, and the before-and-after line count is visible from the first paste.
Put the gappy text in the top box
Paste the list, the export or the draft straight in. ⌘V — Ctrl+V for Windows — reaches the box from anywhere on the page, clicking optional. The counter above the box immediately shows how many lines went in and how many will come out, so you know the size of the problem before you decide anything.
Say how many blank lines may stay in a row
None gives you a solid block with nothing between the entries, which is what a spreadsheet column or an import file wants. One keeps a single gap wherever there was at least one, which is how prose marks its paragraphs, and quietly shrinks a run of six down to that one. Up to two suits drafts that use a double gap deliberately between sections.
Deal with the lines that only look blank
Leave the first tick box on and a line holding nothing but spaces or a tab counts as blank and goes with the rest; the coloured note says how many of the deleted lines were of that kind. The third box empties any gap that survives, so a kept blank line contains nothing at all rather than the two spaces it started with. Then copy the closed-up text.
Technical specifications
| What counts as blank | A line with nothing on it, and optionally a line holding only spaces or tabs — the second kind is far more common in text pasted from the web |
|---|---|
| Blank lines allowed in a row | None, one or two; a run longer than the allowance shrinks to the allowance rather than disappearing entirely |
| Edges | Leading and trailing blank lines are removed independently of the run allowance, so a list never starts or ends on an empty record |
| Line endings normalised first | Every convention in circulation is reduced to one before a single line is judged, so a file written on Windows behaves the same as one written on a Mac |
| What it never touches | The content of any surviving line, including its indentation, its internal double spaces and its trailing spaces |
| What the report gives you | Lines in, lines out, how many removed lines were whitespace-only rather than truly empty, how many runs of two or more were found, and how many gaps were kept |
| Length limit and speed | None. A 50,000-line export is scanned in a single pass in roughly 10 ms, and the result redraws as you change the options |
| Price | Free, no signup, no limit on how many lists you clean |
Frequently asked questions
Why do some of my blank lines survive when I delete them by hand?
Because they were never blank — they hold a space, a tab, or one of the invisible characters a web page leaves behind. On screen there is no difference at all between a line with nothing on it and a line with two spaces on it, so you delete what you can see and the rest stay. The first tick box treats a line as blank when everything on it is whitespace, and the note under the tool counts how many of the lines it removed were of that kind. On a typical web paste it is more than half of them.
How do I keep one blank line between paragraphs but get rid of the rest?
Choose the middle option, which allows at most one blank line in a row. A run of two, three or six gaps shrinks to a single one, while paragraphs that were already separated by one gap are untouched, so the shape of your prose survives. This is the setting for a draft; the first setting, which allows none, is for a list.
Does it delete the gaps at the very top and bottom too?
Yes, whenever the second tick box is on, and independently of how many gaps you allow in the middle. Leading and trailing blank lines are almost never deliberate — they are what is left when you select slightly too much — and they cause specific problems: an empty first record in an import, a stray row at the bottom of a pasted column, an unexpected offset in anything that counts from line one.
Will it remove the spaces inside my lines as well?
No. This page only ever deletes whole lines, and the text on every surviving line comes through exactly as you pasted it, including any double spaces and trailing spaces it carried. The one exception is the third tick box, which empties out a blank line that survives so it holds nothing rather than whitespace. Cleaning up the spacing within lines is a separate job with its own controls.
Why does my text look shorter than the number of lines removed suggests?
Because a blank line costs only one character — the line break itself — so removing forty of them saves forty characters and no more. The line count falls dramatically while the character count barely moves, and that is the expected result rather than a sign that something went wrong. The tiles under the tool report both numbers side by side for exactly this reason.
Does it matter whether my file came from Windows or a Mac?
No, and this is one of the quieter causes of blank lines surviving elsewhere. A Windows file marks the end of a line with two characters rather than one, and tools that only recognise one of them see a stray character at the start of every line, which means no line is ever blank. Both conventions, along with the older single-character Mac ending and two rarer Unicode separators, are normalised before anything here is counted.
My list has repeated entries as well as gaps. Which do I do first?
Close the gaps first, then take out the repeats. Blank lines are all identical to one another, so a de-duplicating pass run first will either collapse every gap in the document into a single one or, if it has been told to leave blanks alone, do nothing about them at all. Removing them here leaves a solid list, which is the cleanest thing to hand to the next step.
A line with two spaces on it is not an empty line
The reason this job resists being done by hand is that two things that look identical are not the same. A line containing nothing and a line containing a single space are indistinguishable on screen at any zoom level, in any font, in every editor. You select the gaps you can see, delete them, and half of them come back — except they never went, because they were never the kind of line you were deleting. Text pasted out of a browser is the worst offender: the layout of a web page is built from margins rather than blank lines, and when the text is flattened those margins arrive as lines with a stray space or a non-breaking space on them. Treating whitespace-only lines as blank is the default here, and the tool reports how many of the lines it removed were of that kind, which is often the majority.
Where the gaps came from decides what you should do with them. A double press of Enter between paragraphs is the oldest convention in plain text and is genuinely meaningful: strip it and your prose becomes one wall. An export from a database or a form that writes one record per line, with a spare line feed at the end of each write, produces an alternating pattern where every second line is empty and every one of them is noise. A copy from a numbered list on a web page usually gives you a gap between each item. That is why the choice above is a number rather than a switch: none for a list that has to import cleanly, one for a draft whose paragraph structure you want to keep, two for a manuscript that separates scenes with a double gap. Once the gaps are consistent, the line counter will finally give the same total as the row numbers in your editor.
One trap worth knowing before you clean a list: order matters when you are also removing repeats. Blanks are the one kind of line with no content to tell them apart, so a de-duplicating pass reads forty gaps as forty copies of one entry and either crushes them into a single break or has to be told to leave blanks alone. Closing the gaps first leaves a solid block where every line is real content, and removing duplicate lines then has an unambiguous list to work on. The same logic applies to sorting, where blank lines all sort together into one clump at the top.
What happens to the list you paste
The lines are counted and filtered by code already running in this tab, so the export, address list or draft chapter you paste never travels anywhere. No copy is uploaded, none is logged, and none is held over for a second visit — clearing the box or closing the tab is all the deletion there is to do. Cut the connection once this page has loaded and the filtering carries on regardless.