Sort a list alphabetically
Alphabetical order is not universal: ñ, ö, accented vowels, Japanese scripts and digit sequences all move differently depending on the reader's locale. This tool sorts a list with the requested language rules, preserves every original string and reports the exact locale and options that were applied.
Run — free
Why ordinary string sorting gives surprising results
A byte-by-byte or code-point sort treats text as a sequence of numeric identifiers, not as words a person expects to find in an index. Uppercase letters may jump ahead of lowercase ones, accented forms may land far from their base letter, and item 12 may appear before item 2. Those results are technically repeatable but linguistically wrong for directories, customer lists and product menus. Locale-aware collation applies the ordering conventions of a requested BCP-47 locale while leaving the spelling and script of each submitted value untouched. It changes position only; it never transliterates, translates or normalizes the returned text.
Choose the distinctions that matter
Send an array of strings and a locale such as en, es, de or ja. Sensitivity controls whether case and accents distinguish otherwise similar entries: base sensitivity can treat cafe, café and CAFE as equivalent, while variant sensitivity keeps every distinction. Numeric ordering recognizes digit sequences inside text, so chapter 2 comes before chapter 12. Punctuation can also be considered or ignored. The response includes the requested locale, the runtime's resolved locale and every effective collation option, which makes an automated result auditable instead of hiding a silent fallback behind a sorted array.
Stable ordering protects records that compare as equal
Two values can compare as equal without being identical. That happens deliberately with base sensitivity, and it can also occur when punctuation is ignored. This capability records each value's original index before sorting and uses that index as the final tie-breaker. Equal entries therefore stay in their input order, even when descending order is requested. The output returns both the sorted strings and their original indexes, so a caller can reorder related records without guessing which duplicate moved where. This explicit stability matters for repeatable exports, test fixtures and pipelines that process the same list more than once.
Use it locally or in a repeatable pipeline
The browser tool performs the work locally and does not need an account, network lookup or language model. For automated jobs, the API uses the same pure collation contract and charges the published base amount per successful request; the unit tracks each thousand rows even though the current marginal price is zero. Requests are bounded by item count and total character count to keep memory and sort time predictable. Use the result for navigation labels, contact exports, multilingual glossaries or any list where people should recognize the order as their own rather than as an implementation detail.
What you can do with it
Customer and member directories
Sort names with the reader's locale while preserving accents, capitalization and duplicate records exactly as submitted.
Product filters and navigation
Place labels and model names in a predictable local order, including embedded numbers such as Series 2 and Series 12.
Multilingual glossaries
Build separate indexes for Spanish, German, Japanese or Arabic content without transliterating the source terms.
Stable spreadsheet exports
Use original indexes to apply the same ordering to adjacent columns while equal labels retain their prior sequence.
FAQ
How do I sort a list alphabetically with accents?
Submit the strings with the intended locale and choose accent or variant sensitivity. The collator then places accented forms according to that locale instead of raw Unicode code points.
Does sorting change or transliterate my text?
No. Every returned string is byte-for-byte the value supplied by the caller; only its position changes.
Why does the response include resolved_locale?
It reports the locale actually used. If a valid BCP-47 tag is unknown to the runtime, the sorter explicitly falls back to English rather than the browser's default locale, so resolved_locale is en.
Is numeric sorting enabled?
Yes by default, so text containing 2 sorts before text containing 12. Set numeric to false when digits should be compared as ordinary characters.
Is the alphabetical list sorter free?
The browser tool is free and runs locally. API requests use prepaid KIT balance and the published $0.002 base price; failed tasks are not charged.
What happens to duplicate or equivalent values?
Values that compare as equal keep their original relative order. The original_indexes array also identifies the source position of every result.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/locale/sort \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"items":["Ángel","angel","ñandú","nandu","item 12","item 2"]}'const res = await fetch("https://api.kit.forhosting.com/locale/sort", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"items": [
"Ángel",
"angel",
"ñandú",
"nandu",
"item 12",
"item 2"
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/locale/sort",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"items": [
"Ángel",
"angel",
"ñandú",
"nandu",
"item 12",
"item 2"
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/locale/sort", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"items":["Ángel","angel","ñandú","nandu","item 12","item 2"]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"items":["Ángel","angel","ñandú","nandu","item 12","item 2"]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/locale/sort", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"items": [
"Ángel",
"angel",
"ñandú",
"nandu",
"item 12",
"item 2"
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "locale.sort",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_items | 10000 |
max_chars | 500000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |