Spanish Alphabetical Sort

Sort Spanish word lists, with optional legacy ch and ll digraph order

Sort Spanish word lists with correct collation: ñ after n, accent-insensitive ordering, and an optional legacy mode that treats ch and ll as single letters between c and d and between l and m.

How does Spanish alphabetical order differ from English?

The key difference is the letter ñ, which sorts immediately after n and before o, so leña comes after lena and before loro. Spanish collation also ignores accents for primary ordering, so él and el are treated as equal at the base level.

Sort Spanish words in correct dictionary order

Sorting Spanish is not the same as a plain ASCII sort. The letter ñ belongs between n and o, accents should be ignored for primary ordering, and — in older dictionaries — the digraphs ch and ll counted as single letters with their own positions. This tool sorts your list with modern Unicode Spanish collation by default and offers a legacy mode that reproduces pre-1994 dictionary order.

How it works

In modern mode the tool uses the browser’s Intl.Collator set to the Spanish (es) locale with sensitivity: "base", which orders by base letter, places ñ after n, and treats accents as a tie-breaker rather than a primary key. In legacy mode it first rewrites each word so that ch and ll map to sort keys that fall just after c and l respectively, then compares those keys, so chico sorts after cuna and before dado, exactly as an old dictionary would list it. Original spelling and case are preserved in the output.

Tips and example

Given loro, leña, lena, llave, luz in modern mode you get lena, leña, llave, loro, luz — note ll sorts as l+l, so llave falls between leña and loro. In legacy mode the same list becomes lena, leña, loro, luz, llave, because ll is now its own letter after l. Use modern mode for anything new; reach for legacy mode only when matching a historical index or an old printed dictionary. Reverse the order for a Z-to-A listing.