Text & Data🌐 YAS server-sideAPI availablebeginner
Text Sorter
Sorts lines of text ascending or descending, with unique and natural-order options.
Processed by YAS · not stored
Ready to runInstant execution
Result
—What does this tool do?
Sorts lines of text ascending or descending, with unique and natural-order options.
Why would I use it?
- You have a list of values to sort for a report.
- You want to deduplicate a list.
- You are preparing data for comparison.
Real-life example
Input
banana apple cherry
Output
apple banana cherry
Lines are sorted lexicographically by default.
Input → Process → Output → Next
- Input
- Paste lines, choose order/options.
- Process
- YAS sorts the lines.
- Output
- The sorted list.
- Next action
- Copy the result back to your document.
Common mistakes
- Sorting numbers lexicographically (10 < 9).
- Expecting case-insensitive sorting by default.
- Losing blank lines in the output.
What the result means
The output order follows the chosen sort mode.
Privacy & security
Your input is sent to YAS infrastructure because the tool requires server-side processing or public network queries. Input is not stored.
API
Endpoint
POST https://yas.sh/api/v1/tools/text-sorter
Request Header
Content-Type: application/json
cURL
curl -X POST "https://yas.sh/api/v1/tools/text-sorter" \
-H "Content-Type: application/json" \
-d '{"input":"b\na\nc","mode":"asc"}'JavaScript
const res = await fetch("https://yas.sh/api/v1/tools/text-sorter", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"input": "b\na\nc",
"mode": "asc"
}),
});
const data = await res.json();Python
import requests
r = requests.post("https://yas.sh/api/v1/tools/text-sorter", json={"input":"b\na\nc","mode":"asc"})
data = r.json()| Field | Type | Required | Description |
|---|---|---|---|
| input | string | Yes | Multi-line text |
| mode | string | No (default "asc") | asc | desc | natural | unique | shuffle |
Success response
{ "result": "a\nb\nc" }Sort lines ascending / descending / natural, dedupe, or shuffle (CSPRNG).
Error responses
400 VALIDATION_ERROR— invalid input or unsupported option.413 PAYLOAD_TOO_LARGE— input exceeds the 64 KB limit.429 RATE_LIMIT_EXCEEDED— rate limit exceeded (60 req/min).
Limits
- Maximum input: 64 KB per request.
- Rate limit: 60 requests/min per IP address.
- Authenticated accounts benefit from higher tier quotas.
Related tools