Inspectors

Line Sort / Dedupe

Paste a list of lines and perform common line operations: sort alphabetically, sort numerically, remove duplicates, reverse the order, shuffle randomly, or trim whitespace from each line. Multiple operations can be combined. Useful for cleaning up log files, deduplicating lists, or preparing data for further processing.

Line Sort/Dedupe — Sort, deduplicate, reverse and trim lines of text

What it does

  • Sorts lines alphabetically (A-Z) or reverse alphabetically (Z-A)
  • Sorts lines numerically (handles negative numbers and decimals)
  • Removes duplicate lines (case-sensitive or case-insensitive)
  • Reverses the order of lines
  • Shuffles lines randomly
  • Trims leading/trailing whitespace from each line
  • Removes empty lines

Use cases

  • Deduplicating a list of email addresses or URLs
  • Sorting log lines chronologically or alphabetically
  • Cleaning up a list of hostnames or IP addresses
  • Reversing the order of lines in a file for chronological reading

How it works

1

Paste your text lines into the input pane

2

Select one or more operations (sort, dedupe, reverse, etc.)

3

The operations are applied in order

4

The result appears in the output pane

Frequently asked questions

1Can I combine multiple operations?

Yes. For example, you can sort alphabetically and then remove duplicates, or trim whitespace and then sort. Operations are applied in the order they're listed in the options.

2What's the difference between alphabetical and numerical sort?

Alphabetical sort compares strings character by character, so '10' comes before '2' (because '1' < '2'). Numerical sort compares values as numbers, so 2 comes before 10. Use numerical sort when your lines contain numbers.

3Does dedupe preserve order?

By default, dedupe removes duplicates while preserving the first occurrence of each line. If you also sort, the sort is applied first, then duplicates are removed from the sorted result.

Related tools

Use Line Sort/Dedupe offline in Devinity

All 95 tools run locally on your Mac. No internet required, no data sent to servers.

Download Devinity →