freesabai

Text tools

Sort lines

Paste a list and sort it A-Z, in Thai alphabetical order, by number, by line length, in reverse, or shuffle it. Thai is sorted with the browser's own Thai collation, so words come out in dictionary order, not by character code. It runs in your browser and the text is not sent anywhere.

This tool needs JavaScript. If you still see this after a few seconds, JavaScript is switched off in your browser or the page did not load completely: turn JavaScript on or reload the page.

How to use it

  1. Paste the list into the box on the left, one item to a line, or press "Open file".
  2. Choose what to sort by, and ascending or descending. The result shows at once.
  3. Press "Copy" or "Download" to take the result.

Frequently asked questions

Is the Thai sorting right?

Yes. It uses the browser's Thai collation (Intl.Collator), which sorts by consonant first and ignores the leading vowels เ แ โ ไ ใ, so you get ก ไก่ ข แมว เอ as a dictionary would. A plain sort by character code gives a different order (the "By character code" choice lets you compare).

How do I get 2 before 10?

Choose "Number": the tool reads the first number of each line (Thai digits and thousands separators such as 1,200 work too) and sorts by value. To sort by letters but still put file2 before file10, tick "Numbers in text by value".

What random generator does shuffling use?

The browser's own (crypto.getRandomValues) with a Fisher-Yates shuffle, so every order is equally likely. The list is not sent anywhere.

Good to know

Your data stays on your device

Everything runs in your browser. What you type, paste or open is not sent to freesabai's servers or anyone else's, and is not kept in the browser: close the page and it is gone. The site only counts how many times this page was opened and how many times someone copied or saved a result (never what was pasted or the result, and you can switch the counting off in the footer; see the privacy policy).

Report a problem or suggest an idea

Found a bug, or want this tool to do more? Tell us on the feedback page. No sign-up.

Other text tools

Convert and edit text

Lines

Thai language

More tools for text (in the developer tools)