Source: https://wordmeasure.com/tools/line-counter/
Summary: Count the lines in any text, remove empty lines and strip unwanted line breaks from copied emails or PDFs. Paste your text, pick an option and copy it.

This page is an interactive tool that runs in the browser: https://wordmeasure.com/tools/line-counter/
AI assistants can get exact counts without a browser through the WordMeasure MCP server at https://wordmeasure.com/mcp (tools: count_text, check_platform_limits, change_case, keyword_density).

# Line counter

Paste your text to count its lines, including empty ones. Then remove empty lines or strip the line breaks left behind by emails and PDFs, and copy the tidy result.

## How the line counter works

Every line break starts a new line, so a text with no line breaks is one line long, and each press of Enter adds one more. Empty lines, including lines that hold only spaces, are counted too, because they are still lines. The figures above split the total into lines with text and empty lines, so you can see how much space blank lines take up.

Lines here are the lines you make with Enter. When a long line wraps onto the next row of the box because it is too wide, that is not a new line, and it is not counted as one. Your text is counted in your browser and is never uploaded.

## The three clean up options

- Remove empty lines deletes every blank line and keeps all the lines that have text, each on its own line. Use it for lists and data with gaps in them.
- Remove line breaks, keep paragraphs joins the lines inside each paragraph into one, but keeps a blank line between paragraphs. Use it for text copied from emails and PDFs, where every line ends with a hard break.
- Join everything into one line removes every line break, so the whole text becomes a single line. Use it for a form or a spreadsheet cell that does not allow line breaks.

The result appears in its own box, so your original text is never changed. Copy the result, or press Use result as your text to keep working on it.

## Why copied text is full of line breaks

A PDF stores each line of a page as a separate piece of text. When you copy from it, a hard line break comes with the end of every line, so a paragraph pastes as a column of short lines. Older plain text emails do the same, because many email programs break lines at a fixed width. The line break remover puts each paragraph back together. If you need the word count of a whole PDF, our [PDF word counter](https://wordmeasure.com/tools/pdf-word-counter/) reads the file for you.

## Questions about lines and line breaks

### How do I count lines in a text?

Paste the text into the box and the Lines figure shows the total straight away. Lines with text and empty lines are counted separately next to it. The count updates as you type, so you can add or remove lines and watch it change.

### How is the number of lines in text counted?

The count is the number of line breaks plus one. So "one line", then Enter, then "two lines" is two lines. If your text ends with a line break, the empty line after it counts too, and it shows up in the empty lines figure.

### How do I remove line breaks from copied text?

Paste the text, then press Remove line breaks, keep paragraphs. The lines inside each paragraph are joined with a space and the gaps between paragraphs stay. Press Copy result to copy the tidy version.

### How do I remove empty lines?

Press Remove empty lines. Every blank line goes, including lines that only contain spaces or tabs, and the lines with text stay in the same order.

### Is there a line break remover that keeps my paragraphs?

Yes, that is what the middle option does. It treats a blank line as the end of a paragraph and keeps it. If your text has no blank lines between paragraphs, it will join everything into one paragraph, so add a blank line wherever you want a break to stay.

### Does a line counter count wrapped lines?

No. How text wraps depends on the width of the box and the size of the letters, so it changes from screen to screen. Only real line breaks are counted, which gives the same answer on every device.

## Related tools and guides

- [Word counter](https://wordmeasure.com/): words, characters, sentences, paragraphs and reading time.
- [Alphabetical order tool](https://wordmeasure.com/tools/alphabetize-list/): sort a list of lines from A to Z.
- [Sentence counter](https://wordmeasure.com/tools/sentence-counter/): count sentences and find the longest.
- [PDF word counter](https://wordmeasure.com/tools/pdf-word-counter/): count the words, characters and pages in a PDF.
