Line Counter
Count total lines, non-empty lines, and unique lines in any block of text. Add line numbers (with custom starting number and padding), filter lines that match or don't match a keyword or regex, and sort lines alphabetically or by length. Useful for processing logs, CSV data, code, and lists.
Runs in your browser
Nothing uploaded
Free, no signup
Ctrl + Enter to run · Recent brings back your last inputs · Everything stays in this browser
Line Counter: questions
Can I filter with a regex?
Yes — enable "Regex" mode and type a valid JavaScript regular expression. Lines matching the pattern are kept (or removed, in "exclude" mode). Flags like /i for case-insensitive can be toggled.
Does it handle Windows (CRLF) line endings?
Yes — both \n and \r\n line endings are normalized before processing.
What is the line limit?
There is no hard limit — the tool processes as many lines as your browser can handle. Performance degrades gracefully above ~100 000 lines.
Related tools
All 112 free tools
JSON Formatter & ValidatorPretty-print & validate JSON
Image Resize CalculatorCalculate new dimensions while preserving aspect ratio
Password Strength CheckerAnalyze password entropy and weaknesses
YAML ↔ JSON ConverterConvert between YAML and JSON
JSON to YAMLConvert JSON to YAML format
JSON Schema GeneratorInfer and validate API contracts
Made something with AI? Share it as a private link.
Drop in the HTML from Claude, ChatGPT or any editor and get a link your client can open anywhere — with a password, view tracking, comments and approval.