Sort list | Organize Your Data Effortlessly
Organize data with our Sort List tool. Sort numbers, words, or custom entries in ascending or descending order for data analysis or programming tasks.
How Do I Sort a List?
Paste your text and the sort list tool puts every line in order instantly, right in your browser. You can sort alphabetically (A-Z or Z-A) or numerically, and the list sorter also lets you reverse the order, remove duplicates, and ignore case. No upload, no sign-up, and your list never leaves your device.
Sorting Options
| Option | What it does |
|---|---|
| Alphabetical A to Z | Ascending order |
| Alphabetical Z to A | Descending order |
| Numerical | Sort numbers smallest to largest |
| Reverse | Flip the current order |
| Remove duplicates | Keep only unique items |
Basic Usage
- Paste your text in the input box
- Choose your sorting options
- Click "Sort Text" to process
- Copy or download the result
Pro Tips
- Use Natural Sort for lists containing numbers
- Remove duplicates to clean up lists
- Use different separators for CSV data
Use this tool from your AI agent
Free JSON API and Model Context Protocol (MCP) server. No signup, no API key, CORS open. Designed for Claude, ChatGPT, Cursor, scripts and frontend apps.
curl -X POST https://mate.tools/api/v1/sort-lines.php \
-H "Content-Type: application/json" \
-d '{"text":"banana\napple\ncherry","order":"asc"}' import urllib.request, json
req = urllib.request.Request(
"https://mate.tools/api/v1/sort-lines.php",
data=json.dumps({"text":"banana\napple\ncherry","order":"asc"}).encode(),
headers={"Content-Type": "application/json"},
)
with urllib.request.urlopen(req) as r:
print(json.load(r)) const r = await fetch("https://mate.tools/api/v1/sort-lines.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"text":"banana\napple\ncherry","order":"asc"}),
});
console.log(await r.json()); Add to claude_desktop_config.json (Claude Desktop), ~/.cursor/mcp.json (Cursor), or any other MCP-compatible client:
{
"mcpServers": {
"mate-tools": {
"command": "npx",
"args": ["-y", "@mate-tools/mcp-server"]
}
}
} Frequently Asked Questions
Natural Sort handles numbers intelligently, ordering "item2" before "item10" as humans would expect. Machine Sort treats text as raw characters, placing "item10" before "item2" because "1" comes before "2" alphabetically. Use Natural Sort for lists with numbers, Machine Sort for strict alphabetical ordering.
Select "Comma" as your input separator in the sorting options. The tool will split your comma-separated values into individual items, sort them, and you can choose any output separator (new line, comma, semicolon, etc.) for the result.
Yes, enable the "Remove Duplicates" option before sorting. This will eliminate all duplicate entries from your list while sorting. Combined with "Ignore Case," it will also remove duplicates that differ only in capitalization (treating "Apple" and "apple" as the same).
How Do I Sort a List?
Paste your text and the sort list tool puts every line in order instantly, right in your browser. You can sort alphabetically (A-Z or Z-A) or numerically, and the list sorter also lets you reverse the order, remove duplicates, and ignore case. No upload, no sign-up, and your list never leaves your device.