Sort Letters in Words

Alphabetize the letters inside every word - or shuffle them - while the words and punctuation stay exactly where they are.

Sort Letters in Words

This tool rearranges the letters inside each word into alphabetical, custom or random order.
Paste or type your text in the "Input" field, choose a sort method and options, and press the "Sort Letters",
and get the result in the "Output" field.


Load an example

1. Sort method
Characters listed first sort first
2. Scope & letter case
What gets sorted on its own
Ignore capitals when ordering letters
3. Punctuation, digits & cleanup
Keep only one of each letter per word
Ready to sort letters.


Overview

Sort Letters in Words is a free online tool that rearranges the letters inside every word into a chosen order - alphabetical (A-Z), reverse alphabetical (Z-A), vowels first, consonants first, Unicode code-point order, a custom order you define, or a random shuffle. Unlike a random scramble, most of these modes are deterministic: in A-Z mode the word "Orbital" always becomes "Abilort", so the same input produces the same result every time.

The words themselves, their order, and the surrounding spaces and punctuation all stay exactly where they were, so the text keeps its shape while the inside of each word is reorganised. You can sort each word on its own or pool the letters of a whole sentence, and separate settings decide how capitals, punctuation and digits are treated. That makes the tool useful for building anagram puzzles, checking whether two words share the same letters (listen, silent and enlist all sort to eilnst), tidying jumbled lists, creating cryptogram-style text, or simply studying how letter order differs from word order.

The tool is written in PHP, HTML, CSS and vanilla JavaScript. Every sort runs locally in your browser, so your text never leaves your device, nothing is uploaded or stored, and it works on any device with a modern browser - free, with no account needed.


How to Use This Tool

1. Add your text: Paste or type it into the "Input" field, click "Upload a file" to load a text file, or use "Load an example" to try a sample.

2. Choose a sort method: Pick Alphabetical (A-Z), Reverse (Z-A), Vowels first, Consonants first, Code point order, Custom order or Random shuffle.

3. Set the scope and options: Choose whether to sort Each word or Each sentence, how letter case is handled, and what happens to punctuation, digits and repeated letters.

4. Sort: Click the "Sort Letters" button (it becomes "Shuffle Letters" in random mode). The result appears in the "Output" field with a message showing how many words were processed. Copy or download it, or use "Clear & Reset" to start over.


Examples

Every example below loads its own text and options - click "Try it" to see the result in the "Output" field right away.

1. Alphabetize every word (A-Z)

Each word is sorted on its own, and "Keep position case" keeps the capital at the start of a sentence.

Input
Galaxy Nebula Comet
Output
Aaglxy Abelnu Cemot

2. Reverse alphabetical order (Z-A)

The same letters, sorted from Z down to A.

Input
Puzzle Pieces
Output
Zzuple Spieec

3. Check for anagrams

Words that share the same letters produce the same sorted result, so they are anagrams of one another.

Input
listen silent enlist
Output
eilnst eilnst eilnst

4. Keep digits and punctuation in place

Both sentences are sorted word by word with "Digits" and "Punctuation" set to keep in place. Only the letters move, so the numbers and symbols hold their positions and each capital stays at the start.

Input
R2D2C is a droid. It's well-known!
Output
C2D2R is a ddior. Is't ekll-nnoww!

5. Anagram a whole sentence

With "Each sentence" scope, the letters of an entire sentence are pooled and spread back across its letter positions, so every sentence becomes one big anagram.

Input
silent listen. evil vile.
Output
eeiill nnsstt. eeii llvv.

Features & Options

Input & Output: The "Input" textarea is where you type, paste or upload your text. The sorted result is shown in the read-only "Output" textarea, ready to copy or download.

Sort method - Alphabetical (A-Z) and Reverse (Z-A): The core modes. "flower" becomes "eflorw" in A-Z and "wrolfe" in Z-A.

Sort method - Vowels first / Consonants first: Groups vowels and consonants together, each group in alphabetical order. "Mountain" becomes "Aioumnnt" with vowels first.

Sort method - Code point order: Orders characters by their Unicode code point instead of the alphabet, which is useful when working with mixed scripts or symbols.

Sort method - Custom order: Type the characters in the exact order you want (for example etaoinshrdlu for English letter frequency). Characters listed first sort first; anything not listed goes to the end in alphabetical order.

Sort method - Random shuffle: Ignores ordering and randomly rearranges the letters instead. Each click gives a fresh arrangement. For a dedicated shuffle tool with more scope options, see our Randomize Letters in Text tool.

Scope - Each word / Each sentence: Each word sorts the letters of every word independently, so word order never changes. Each sentence pools all the letters of a sentence and redistributes them across that sentence's letter positions, which turns the whole sentence into a single anagram.

Case - Keep position case: The case follows the original position, so a capital at the start of a sentence stays at the start. "Orbital" becomes "Abilort".

Case - Move each letter's case: Each letter keeps its own case and carries it to the new position. "Orbital" becomes "abilOrt". The other two options force everything to lowercase or uppercase.

Case-insensitive sorting: On by default, this ignores capitals while ordering letters, so "Zebra" and "apple" sort as if both were lowercase. Turn it off to sort by actual character code, where capitals come before lowercase.

Punctuation - keep / sort / split / remove: Keep in place leaves symbols at their positions and sorts only the letters; sort with letters treats symbols as sortable characters; split at punctuation sorts each run between symbols separately; remove deletes symbols before sorting.

Digits - keep / sort / remove: The same three choices for numbers, so you can hold digits in place, include them in the ordering, or strip them out.

Remove repeating letters: Keeps only the first copy of each letter in a word, so duplicates disappear. Words may come out shorter.

Live sort while typing: Off by default. Turn it on to re-sort automatically every time you type or change a setting, instead of pressing the button.

Load an example: Loads a sample sentence into the "Input" field and resets the options to their defaults so you can test the tool instantly.

Upload a file: Reads a plain text file from your device into the "Input" field - handy for sorting saved text.

Copy & Download: "Copy" puts the output on your clipboard for pasting elsewhere; "Download" saves it as a text file.

Sort Letters button: The central action - it applies the chosen method and options to every word or sentence and writes the result to the "Output" field. In random mode it reads "Shuffle Letters".

Clear & Reset: Clears both textareas and returns every option to its default value.


When to Use This Tool?

Anagram and word puzzles: Sort the letters of a word or phrase to reveal the hidden order behind an anagram. Two words that sort to the same string use exactly the same letters, which makes Each word mode a quick anagram checker.

Cryptogram-style text: Sorted words look unfamiliar but keep their shape and position, so you can build a playful "decode this" challenge without changing the sentence structure.

Character inventories: Use Remove repeating letters to see which distinct letters a word or name contains - handy for crossword clues, Scrabble planning or password analysis.

Tidying jumbled data: Codes, tags or short identifiers that arrived scrambled can be normalised into a consistent order, so near-duplicates line up and become easy to compare or deduplicate.

Custom collation: When your alphabet is not A-Z, use Custom order to sort by your own sequence, such as letter frequency or a language-specific alphabet.

Teaching and demonstrations: Show the difference between letter order and word order, or between case-sensitive and case-insensitive sorting, with a live example your audience can reproduce.


FAQs

FAQ 1: Does sorting letters change the order of my words?
Answer: No. In Each word mode every word stays in its original place and only the letters inside it are rearranged. Spaces and punctuation are never moved in "keep in place" mode, so the sentence keeps its shape.

FAQ 2: Why did a capital letter move or disappear?
Answer: It depends on the case setting. Keep position case keeps the original capital at the start of a word; Move each letter's case carries the capital with its letter to the new position; Lowercase all and Uppercase all remove the original capitals entirely.

FAQ 3: What is the difference between "Each word" and "Each sentence"?
Answer: Each word sorts the letters of every word separately. Each sentence pools all the letters in a sentence and spreads them back across the sentence's letter positions, so the words are reshuffled into one another - an anagram of the whole sentence.

FAQ 4: What does "Custom order" do?
Answer: It sorts letters by a sequence you type. Characters that appear earlier in your sequence come first, and any character not listed is placed at the end in alphabetical order. For example, entering etaoinshrdlu sorts common English letters before the rest.

FAQ 5: Can I keep numbers and symbols exactly where they are?
Answer: Yes. Set Punctuation: keep in place and Digits: keep in place (both are the defaults). Only the letters move, so a code like R2D2C becomes C2D2R.

FAQ 6: Is my text private, and is the tool free?
Answer: Yes. The tool runs entirely in your browser with JavaScript, so your text is never uploaded to or stored on our servers. It is completely free and needs no account.


Tools Worth Trying

TextToolz

The Ultimate Text Tools

TextToolz works seamlessly to let you convert and design your text. It is fast, reliable and secure. Trusted by thousands of users.