Your files stay on your device

# Sort and clean up lines

Sort lines, remove duplicates and blank lines, trim spaces, or number them.
Lines to transformTransformLine endingsLFCRLFKeepSortNoneAscendingDescendingTrim trailing whitespaceRemove empty linesNumeric-aware sortNatural numeric sort (embedded numbers)Case-insensitiveDeduplicateReverse orderNumber linesKeep lines containing

Literal substring match (case-insensitive when checked).
Join with (optional)

Empty = keep line breaks.
Filter regex (overrides the literal filter)

Invalid patterns are an error, never ignored.
Prefix / suffix / quote

Applied to every output line, inside the quotes.
Extract column (optional)

Split on a delimiter, keep column N (1-based).
Invert filter (keep NON-matching lines)Paste, drop, or type to begin. Everything stays on this device.

## More text tools

- [Word & character count](/text/word-count)
- [Case converter](/text/case-converter)
[All text tools](/text)

---

Canonical HTML: https://nutter.tools/text/lines/
Markdown version: https://nutter.tools/text/lines/index.md
Plain-text version: https://nutter.tools/text/lines/index.txt
Agent index: https://nutter.tools/llms.txt

