Back to Free Tools
FREE TOOLS
Consecutive Duplicate Line Collapser
Collapse adjacent identical lines and download a complete report of every original run.
Pasted text, One UTF-8 text file
collapsed.txt, collapse-runs.json
Browser only
Runs locally in your browser. Your files, pasted content and generated output are not uploaded. Reset clears this tool’s working data.
This tool needs JavaScript. If it does not load, refresh the page and try again.
How to use this tool
- Enter Lines or select a UTF-8 file, which takes precedence.
- Select Collapse adjacent duplicates. Case, spaces and nonadjacent repeats stay unchanged.
- Download collapsed.txt and collapse-runs.json.
Examples
Lines a, a, b, a become a, b, a; the final nonadjacent a remains and all three runs are reported.
Limitations
- 1 MiB input, 50,000 lines/runs, 65,536 UTF-16 units per line, 10 MiB combined output and a 30-second processing limit.
- Only exact adjacent runs collapse. CR/LF/CRLF normalize to LF while final-termination state is retained; paste follows native line normalization.
- No global removal, fuzzy equality, whitespace folding or inferred log semantics.
Related tools
No items found.