Sort Letters in a String
Sort all the letters of a string alphabetically. Runs entirely in your browser, so your data never leaves your device.
Runs on your device, nothing uploaded
0 chars · 0 lines
Output
Sort all the letters of a string alphabetically.
Type or paste above to see the result here.
What you paste never leaves this tab
Sort Letters in a String is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, the text you paste is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.
- No upload
- No length limit
- Works offline once loaded
- Nothing stored or logged
How to use Sort Letters in a String
- 1. Paste the string. Enter any word or phrase into the input pane. Sort Letters in a String sorts the letters and drops spaces, digits and punctuation, saying how many it removed. Under More options, Keep spaces and digits sorts them too, and Remove repeated letters keeps each letter once.
- 2. Turn on Descending order if needed. Leave it off to sort from a to z, or turn on Descending order to sort from z to a, useful when checking anagram puzzles that expect reverse order.
- 3. Set Case sensitive. Turn on Case sensitive to keep uppercase letters sorted separately before lowercase ones, or leave it off to treat a and A as equivalent during sorting.
- 4. Copy the sorted letters. Copy the resulting string of alphabetized characters, useful for comparing anagrams or generating a canonical letter signature for the original word.
When to use Sort Letters in a String
Sort Letters in a String rearranges every character in a word or phrase into alphabetical order. This is the standard trick for producing a canonical form of a string that lets you spot anagrams at a glance.
- Checking if two words are anagrams. You suspect 'listen' and 'silent' use the same letters and want to confirm it. Sorting both strings and comparing the results proves it instantly.
- Generating a word puzzle signature. You are building a word game and need a canonical key for each valid word so anagram groups can be looked up quickly. Sorted letters make an ideal dictionary key.
- Solving a Scrabble or Wordle style puzzle. You have a jumble of letters and want to see them in order to spot possible words more easily, since alphabetized letters are easier to scan than a random jumble.
- Verifying a cipher or transposition exercise. A classroom exercise scrambles the letters of a message and asks students to prove no letters were added or removed. Sorting both the original and scrambled text should match exactly.
Examples
Sort letters
Input
dcba
Output
abcd
Anagram key
Input
listen
Output
eilnst
About the Sort Letters in a String tool
Sort Letters in a String does its work locally, right in the browser. Sort all the letters of a string alphabetically. There is no upload step, no queue and no account, and your data never travels over the network.
It belongs to the String Tools collection on EditSafely, a set of 159 small, focused String utilities that share the same instant, private workspace.
You can shape the output with 4 settings, including Descending order, Case sensitive, Keep spaces and digits and Remove repeated letters, and the result refreshes the moment you change one. 2 worked examples further down the page show exactly what the tool produces for real inputs.
Running locally also makes the tool fast and dependable: results appear as soon as your input does, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.
Frequently asked questions
Is Sort Letters in a String free to use?
Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
How much text can I process at once?
There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.
Do I need to sign up or install anything?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.