AmufoYour free workshop for everyday things.

Text Line Tools

Sort, deduplicate and tidy a list, line by line.

Runs in your browser

0lines in
0lines out
0removed

A text cleaner tidies up a list that has one entry per line. It removes repeated entries, sorts the list, trims stray spaces or joins everything into one line. This one cleans lists pasted from a spreadsheet or a PDF in your browser, shows how many lines changed, and uploads nothing.

More for your documents

Open the Documents page

The operations

OperationWhat it does
Remove duplicateskeeps the first occurrence of each line
Sort A→Z, Z→Anatural sort, so item2 comes before item10
Sort by lengthshortest first, alphabetical within the same length
Shufflerandom order, for sampling or for drawing names
Reverse orderlast line first
Trim spacesremoves leading and trailing whitespace from every line
Remove empty linesdeletes every blank line
Collapse blank runsseveral blank lines become one
Number linesadds 1., 2., padded so the numbers align
Add prefix/suffixwraps every line in text you choose: quotes around each name, a dash before each entry
Join into one linewith a separator you choose

The order that usually works

Most lists arrive messy in the same way: copied out of a spreadsheet or a PDF, with stray spaces and repeated entries.

Trim first, because a trailing space makes two identical lines look different to the deduplicator. Then remove duplicates. Then sort. Doing it in the other order leaves duplicates behind, and that is the single most common reason people think a deduplicator is broken.

Ignore case, precisely

The checkbox changes how lines are compared, never what is written out. With it on, Berlin and berlin count as the same entry and the first one wins, keeping its original spelling. Sorting likewise groups them rather than putting all capitals first.

Leaving it off is the right choice whenever capitals matter: file names or product codes where ABC and abc are genuinely different things.

Building a list for code

Add prefix and suffix turns a column of values into something you can paste. Prefix ' and suffix ', gives you a quoted, comma-separated list; join into one line with , gives you one line of values. Both keep the original order unless you sort first.

Questions

Does sorting handle numbers correctly?

Yes. Sorting is natural, so item2 comes before item10 rather than after it, which is what people expect from a list of files or versions.

What does ignore case do?

It affects comparison, not output. With it on, Apple and apple count as duplicates and sort together, but the original spelling is kept.

What is the difference between removing empty lines and collapsing blank runs?

Removing empty lines deletes every one. Collapsing keeps a single blank line where there were several, which is what you usually want for prose.

Can I chain operations?

Yes. Press Result → input and apply the next one. Trim, then remove duplicates, then sort is the common sequence.

Is my list uploaded?

No. It is processed in your browser, and a draft is kept in this browser's local storage so a reload does not lose it.