Linjesætningsværktøj

Tæl linjerne i enhver tekst, med mulighed for at inkludere eller ignorere tomme linjer. Praktisk til lister, kode, undertekster og datafiler.

0 lines
0 non-empty lines
0 words

What counts as a "line"?

A line is any run of text between two line breaks, including blank ones - pasting a paragraph with gaps between sentences will count those gaps as empty lines too. The separate "non-empty lines" figure ignores lines that are blank or contain only whitespace, which is usually the more genuinely useful number when you're checking something like a list of keywords, URLs, or rows pasted straight from a spreadsheet or CSV file.

Why both counts are shown side by side

Total line count tells you exactly how many line breaks exist in the text block as-is, which matters if you're trying to match a specific line-based format or limit. Non-empty line count strips out the noise of accidental blank lines, giving a cleaner read on how many actual list items, records, or content rows are really there - the two numbers can differ substantially on text pasted from sources that insert extra blank lines between entries.

The word count alongside the line counts

A simple running word count is shown at the same time, calculated by splitting the text on whitespace - useful context when you're checking both the structure (how many lines/items) and the overall length (how many words) of the same pasted text at once, without needing to switch to a separate word-counting tool.

Common uses

Checking how many keywords are in a bulk list before pasting them into another tool with a line limit, verifying a CSV or data export has the expected number of rows, or confirming a list of URLs or email addresses matches an expected count before processing it further.

Practical checks where a line count helps

Counting lines is a quick sanity check in many everyday jobs. Before importing a CSV, confirm it has the number of rows you expect. Before building a sitemap, check how many URLs you have, remembering that a single sitemap file can hold at most 50,000 addresses. Before pasting a keyword list into another tool with a limit, count the entries so nothing is silently cut off. A disavow file, a redirect map or a robots rule list can all be verified the same way.

Line endings and invisible characters

Windows, Mac and Linux historically mark the end of a line differently, but a browser text box treats them all as one line break, so the count is the same wherever the text came from. What can change a count are characters you cannot see: a trailing line break at the very end of the text can show as one extra empty line in the total, and a line holding only spaces looks blank but is not truly empty. This is why the non-empty figure is usually the more reliable number.

Counting lines versus counting items

A line is not always one item. A long entry that wraps across your screen is still a single line, while a list where two items share a line separated by a comma counts as one. If your data uses commas or tabs as separators, split it so each item sits on its own line before counting, or use the comma separating tool on this site to convert between the two layouts.

Ofte stillede spørgsmål

Does a blank line count?

Yes, in the total line count. The separate "non-empty lines" count excludes blank or whitespace-only lines, which is usually what you want when counting list items.

Is my text sent anywhere?

No - counting happens entirely in your browser with JavaScript. Nothing you type is transmitted or stored.

Why does my non-empty line count differ so much from my total line count?

This usually means your pasted text has extra blank lines between entries - common when copying from a spreadsheet, an email, or a formatted document - which inflates the total count without representing real content.

How is the word count calculated?

The text is trimmed and split on runs of whitespace, so each sequence of characters separated by spaces, tabs, or line breaks counts as one word - the same basic approach most word counters use.

Can this count lines in a large pasted document?

Yes - since counting runs entirely in your browser, it handles reasonably large pasted text without any upload delay, though extremely large documents (many thousands of lines) may feel slightly less snappy to update live as you type.

Does a trailing line break add an extra line to the count?

It can. A line break at the very end of the text may appear as one extra empty line in the total count. The non-empty lines figure ignores it, so use that number when you only care about real entries.

How many URLs can one sitemap file contain?

A single XML sitemap can list up to 50,000 URLs and be up to 50 MB uncompressed. Larger sites split their URLs across several sitemap files and reference them from a sitemap index.

Mere i Indhold & Skrivningsværktøjer