Sort and dedupe lines

Clean up an email list, a set of keywords or a column pasted from a spreadsheet: sort it, drop the repeats and the blank lines, and copy it back.

How it works

  1. Paste one item per line.
  2. Choose the order and what to remove.
  3. Press Convert and copy the cleaned list.

Are numbers sorted correctly?

Yes. Sorting is natural: item 2 comes before item 10, not after it.

Is "Apple" the same as "apple"?

By default yes, so one of them is removed as a duplicate. Turn on Case sensitive to keep both.

Can I remove duplicates without sorting?

Yes. Choose Keep order and only the duplicates and empty lines are removed.

Use it from ChatGPT, Claude or your own agent

This tool is also a function an AI agent can call for you. It needs the same free account as this page, nothing else.

Fields

  • text (text, required): Lines
  • order ("asc" | "desc" | "length" | "reverse" | "none", optional): Order
  • dedupe (true | false, optional): Remove duplicates
  • trim (true | false, optional): Trim spaces
  • remove_empty (true | false, optional): Remove empty lines
  • case_sensitive (true | false, optional): Case sensitive

A call that works

POST https://orkosi.com/api/v1/public/tools/line-sorter/run
Authorization: Bearer <api_key>

{
  "input": {
    "text": "pear\napple\n\nBanana\napple\nitem 10\nitem 2\n  pear  "
  }
}

Need an account? One request creates it and answers the key: POST https://orkosi.com/api/v1/public/signup. In Claude or ChatGPT, add the Orkosi connector and sign in: https://orkosi.com/api/v1/public/mcp.

This tool as Markdown · Connect an AI assistant