Tools › Remove Duplicate Lines
Remove Duplicate Lines
Free online tool to remove duplicate lines from a list. Keep the first occurrence, ignore case or spaces, drop empty lines, optionally sort A–Z.
Use it from code
The same function is available as an API endpoint. Free tier: 100 calls per day without a key. Pro lifts the limit.
curl -X POST https://spincrus.uz/api/v1/tools/remove-duplicate-lines \
-H "content-type: application/json" \
-H "x-api-key: YOUR_KEY" \
-d '{"text":"apple\nbanana\nApple\napple\n\ncherry\nbanana","caseSensitive":false,"removeEmpty":true}' FAQ
Which copy of a duplicate line is kept?
The first one. Lines keep their original order, and every later line that matches an earlier one is dropped. Turn on sorting if you would rather have the result in alphabetical order.
How do I treat "Apple" and "apple" as the same line?
Turn off "Case sensitive". Lines are then compared in lower case, and the first spelling you wrote is the one that stays in the output.
Why are lines that look identical not removed?
They probably differ by invisible trailing spaces or tabs. Turn on "Trim spaces around lines" so leading and trailing whitespace is ignored when comparing.
Related tools
Cron Expression Explainer
Paste any cron expression and get a plain-English explanation instantly. Supports ranges, steps, lists and @daily/@hourly aliases.
Readability Checker
Free readability score calculator: Flesch Reading Ease, Flesch-Kincaid grade, Gunning Fog and ARI, plus word count and reading time.
JSON to CSV Converter
Convert JSON arrays to CSV online. Nested objects are flattened with dot notation, quotes are escaped correctly, works with large files.