Remove empty lines
Blank lines out. There are two kinds, they look identical on screen, and this counts them separately before asking which you meant. Nothing you type here leaves your browser. It is worked out on your own device, so there is nothing to send and nothing to log — which matters more for text than for most things, because people paste in work they are not supposed to paste anywhere.
A line of spaces looks empty and is not
There are two kinds of blank line and they are not the same thing. One has nothing in it at all. The other holds spaces, or a tab, and nothing you can see.
On screen they are identical. To anything that compares text they are not, and a tool that quietly treats them the same has decided something on your behalf. This page counts them separately and asks which you meant.
Blank lines are often load-bearing
In Markdown a blank line ends a paragraph. In a CSV it can end a record. In a configuration file it may separate sections that mean different things.
Removing every blank line from those turns structured text into a wall, and it is not recoverable afterwards — the information was in the gaps. Worth being sure the gaps are noise before taking them out.