Line Counter

    Count lines, remove duplicate lines, delete blank lines and sort text, instantly, in your browser.

    Runs in your browser. Nothing is uploaded.No signup requiredBuilt byDATAMETA LAB
    1
    Total Lines
    0
    Non-Empty
    1
    Empty Lines
    0
    Unique Lines

    How We Count?

    Total Lines

    Every line break creates a new line. Empty lines are included in the total count.

    Non-Empty Lines

    Lines that contain at least one visible character. Whitespace-only lines are excluded.

    Unique Lines

    Distinct non-empty lines. Duplicates are only counted once.

    Remove Operations

    Remove duplicates keeps the first occurrence. Remove empty removes blank lines.

    All processing happens in your browser. Your data stays private.

    How to use this tool

    1. Paste or type your text into the box above, each item on its own line.
    2. Line counts update instantly as you type: total lines, non-empty lines, blank lines, and unique lines.
    3. Click 'Remove Dups' to delete duplicate lines and keep only unique entries.
    4. Click 'Remove Empty' to strip out blank lines and close up the gaps.
    5. Click 'Sort A-Z' or 'Sort Z-A' to reorder the lines alphabetically.
    6. Click 'Copy' to copy the cleaned-up result to your clipboard.

    About this tool

    Line Counter is a free online tool that counts and cleans up lines of text, with no signup, no upload and no limits. Paste any list and you immediately see four numbers: total lines, non-empty lines, blank lines, and unique lines. From there you can remove duplicate lines, delete empty lines, and sort everything alphabetically in one click. It is built for the everyday jobs that are tedious in a text editor: de-duplicating an email or keyword list, counting how many rows are in a CSV column, checking how many lines of code you pasted, cleaning up a messy export, or confirming a list matches an expected row count. Everything runs entirely inside your browser using JavaScript. Your text is never uploaded, never stored, and never seen by our servers, which makes it safe for confidential lists, internal data, and client information.

    Frequently asked questions

    How do I count the number of lines in a text?

    Paste the text into the box above. The counter updates the moment you paste, with no button to press. 'Total Lines' counts every line break including blank ones, while 'Non-Empty' counts only lines that contain actual characters.

    What is the difference between total lines and non-empty lines?

    Total lines counts every line break in the text, so a trailing blank line or a gap between paragraphs still counts. Non-empty lines ignores lines that are blank or contain only spaces and tabs. If the two numbers differ, the gap is your blank-line count.

    Can I remove duplicate lines?

    Yes. Click 'Remove Dups' and every repeated line is deleted, keeping the first occurrence of each unique line in its original order. The 'Unique' statistic shows how many distinct lines you have before you commit to the change.

    Does this count line breaks or wrapped lines?

    It counts real line breaks (newline characters), not visual wrapping. A long paragraph that wraps across several rows on screen is still a single line, which matches how text editors, code editors, and spreadsheets count lines.

    Is there a limit on how much text I can paste?

    There is no fixed limit. Because the counting happens locally in your browser rather than on a server, the only practical constraint is your device's memory. Lists of tens of thousands of lines handle comfortably.

    Is my text private?

    Completely. The tool is 100% client-side, so your text never leaves your device, is never transmitted to a server, and is never stored. Closing or refreshing the tab discards it entirely, so it is safe for confidential or client data.

    Do I need to create an account?

    No. There is no signup, no login, and no email required. The tool is free to use as many times as you like.