Your Text
100% Private
All counting happens locally in your browser.
Line Counter counts total, non-empty, empty, and unique lines in your text online for free. Analyze lists, logs, and code line by line in your browser.
Written & reviewed by Helperzy Editorial Team · Updated July 2026
Your Text
100% Private
All counting happens locally in your browser.
Drop in the list, log, config file or poem you want measured. There is no line or character limit because everything is counted on your own device.
Read the total, non-empty, empty and unique counts together. A gap between total and unique means duplicates; a gap between total and non-empty means blank spacing.
Look at the longest-line length to confirm nothing breaches a width limit, and use the unique figure to decide whether your list needs deduplicating before import.
This reports how many lines your text contains, broken into four numbers: total, non-empty, empty and unique. The reason four rather than one is that each answers a different question. Total tells you the raw size. Non-empty tells you how many lines carry actual content. Empty tells you how much of the file is spacing. Unique tells you how many distinct entries there are, which is the figure that matters when you are about to import a list somewhere. Developers, data analysts, poets working to a line count and anyone verifying an export all use it, and the numbers update as you type. The method is a split and three passes. Your text is divided on line-break characters, handling Unix line feeds and Windows carriage-return pairs alike. The resulting array length is the total. Lines whose trimmed content is empty are counted as empty, and the remainder as non-empty. For the unique figure, each line is trimmed of surrounding whitespace and compared against a record of what has already been seen, so two lines differing only by a trailing space are recognised as the same entry — which is exactly the behaviour you want when checking a pasted export. Alongside these, the length of the longest line in characters is reported, useful for confirming no line breaches a width limit in code or a fixed-format data file. A worked example. Paste six lines: apple, banana, a blank line, apple with a trailing space, cherry, banana. The total is 6. One line is blank, so empty is 1 and non-empty is 5. For uniqueness, trimming makes the fourth line identical to the first, and the sixth repeats the second, so unique comes to 3 — apple, banana and cherry. That gap between 5 non-empty lines and 3 unique ones is the whole point: it tells you immediately that this list contains two duplicates you would otherwise have imported without noticing. Specific situations. A developer checks that a generated config file has exactly the 240 lines the build script expected. A data analyst pastes a 1,500-row export and finds only 1,438 unique entries, which explains a mismatch downstream. A poet confirms a sonnet is 14 lines before submitting to a competition with a strict form requirement. A sysadmin pastes an error log and sees 800 total lines but 12 unique ones, which reframes the problem entirely. A screenwriter checks a page against a formatting requirement of 55 lines per page. A teacher collecting one answer per line from 32 pupils confirms nobody submitted twice before marking. A translator counting subtitle lines checks the target file has the same number as the source, since a missing line means a dropped caption somewhere in the timeline that will be obvious to viewers. The useful habit is to read total and unique together rather than either alone. A big gap between them means duplicates exist, and a big gap between total and non-empty means the file is mostly whitespace — both are things you want to know before importing anywhere that charges per row or enforces uniqueness. One limitation worth naming: uniqueness here trims whitespace but is otherwise exact and case-sensitive by nature, so Apple and apple count as two distinct lines. If your data has inconsistent capitalisation, normalise the case before relying on the unique figure at all. A trailing newline at the end of a file also produces one final empty line, which is why a 100-item list sometimes reports 101 total rather than 100. All counting runs in your browser, so logs, code and private lists are never uploaded, stored or logged.
Input
Six lines: apple / banana / (blank) / apple (with a trailing space) / cherry / banana
Result
6 total · 5 non-empty · 1 empty · 3 unique
Trimming makes the padded apple identical to the first line and the final banana repeats the second, so five content lines reduce to three distinct entries — apple, banana and cherry.
Paste or type your text and the tool instantly counts the lines, splitting on each line break. It shows total lines, non-empty lines, empty lines, and unique lines in real time, with no submit button — every edit updates the counts immediately.
Count words, characters, sentences, paragraphs & reading time. Supports PDF, DOCX, PPTX uploads. Multilingual — works with Hindi, Arabic, Chinese & more.
Text Repeater repeats any text multiple times online for free. Set custom separator and line breaks between repetitions.
Convert text to speech online for free. Multiple voices, adjustable speed and pitch. Listen to any text read aloud in your browser.
Find and replace text online for free. Supports regex, case-sensitive matching, whole word search, and undo history.
Image Resizer changes image dimensions online — set exact pixels, use percentage scaling, or pick from 12 presets (Instagram, Passport, YouTube, etc.). Target specific file sizes like 50KB or 100KB. Batch resize multiple images. 100% free, browser-based.
Image Converter changes images between any format online free — JPG, PNG, WebP, AVIF, PDF, ICO, BMP, HEIC, GIF, SVG. Batch conversion, resize, rotate, flip, AI format recommendation. 100% browser-based, no upload.
Convert JPG to WebP format online free — reduce image file size by 25-35% with identical visual quality. Batch conversion, adjustable quality, lossless mode available. Boost website speed and Core Web Vitals scores. 100% browser-based, no upload needed.
Convert PNG to WebP format online free — reduce file size by 26-34% while preserving full transparency. Batch conversion, lossless and lossy modes, adjustable quality. Boost website performance and Core Web Vitals. 100% browser-based, no upload needed.