ForHosting KIT · Translation

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.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

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.

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.

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.

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.

POSThttps://api.kit.forhosting.com/locale/sort

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.

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"]}'
{
  "items": [
    "Ángel",
    "angel",
    "ñandú",
    "nandu",
    "item 12",
    "item 2"
  ]
}
{
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_items10000
max_chars500000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →