Reverse Words
Flip the order of the words in a sentence or paragraph while every word stays spelled exactly as you wrote it. "Hello World" becomes "World Hello" — readable, just rearranged.
The implementation keeps every whitespace character, including double spaces, tabs and line breaks, while reversing their order along with the words. It does not collapse gaps or trim the ends; formatted rows are not reversed independently.
Want each word spelled backwards instead? Reverse each word
Need a Different Kind of Reverse?
“Reverse” means different things to different people. Each tool below does one of them, shown on a real example.
- Whole text backwardsHello World becomes dlroW olleH
- Letters of a word or nameletters becomes srettel
- Each word backwards, order keptHello World becomes olleH dlroW
- A sentence or messageI love you becomes you love I
- Line order in a listone / two becomes two / one
- Decode backwards textegassem terceS becomes Secret message
- Learn to write backwardswrite becomes etirw
- Upside down textHello becomes ollǝH
- Mirror writingHello becomes ollɘH
- Not sure? Compare inversionstext becomes ʇxǝʇ
- All six results at onceHello becomes olleH
Word Order Examples
What word-order reversal does to real text, including the whitespace cases most tools get wrong.
| Input | Output | What it shows |
|---|---|---|
| Hello World | World Hello | The canonical example: two words, swapped. |
| The quick brown fox jumps | jumps fox brown quick The | Five words reversed; every word still readable. |
| Hello, World! | World! Hello, | Punctuation stays attached to the word it touched. |
| one two three | three two one | Double and triple spaces are preserved rather than collapsed. |
| a b c | c b a | Tabs and newlines act as separators and travel with the reversal. |
| padded sentence | sentence padded | Leading and trailing whitespace swap ends without being trimmed. |
| To be or not to be | be to not or be To | A phrase that is nearly palindromic at the word level. |
| first line second line | line second line first | Newlines are whitespace, so line order flips as a side effect. |
How Word Reversal Is Implemented
One regular expression does most of the work, and the choice of regex is what preserves your formatting.
Split with a capturing group
The text is split on /(\s+)/ — the parentheses make the separators part of the resulting array rather than discarding them. Reversing that array and joining it restores every gap character for character.
No trimming, no normalising
Nothing is trimmed and no run of whitespace is collapsed. Each gap moves with the reversal, including indentation and leading or trailing whitespace, so formatted rows may be regrouped.
Punctuation belongs to its word
There is no attempt to detach commas or full stops from the tokens they touch. That keeps the behaviour predictable, which matters more than being clever about grammar.
Reversing twice restores the original
Because separators are preserved along with words, running the output back through the tool reproduces your input exactly. It is a useful way to confirm nothing was lost.
Words, Letters or Everything
The distinction between these rows is the most common source of "that is not what I wanted" on a reversal site.
Shared input: Reverse the word order
| Transformation | Result | Reach for it when |
|---|---|---|
| Reverse word order | order word the Reverse | You want the last word first, every word readable. |
| Reverse each word | esreveR eht drow redro | You want each word spelled backwards in place. |
| Reverse everything | redro drow eht esreveR | You want one continuous end-to-start reversal. |
| Reverse lines | Reverse the word order | Your text is a list and only the line order should change. |
Word Reversal Edge Cases
Four behaviours worth knowing about before you paste something formatted.
Words reverse across line breaks
A newline is whitespace, so the words reverse across the whole block rather than separately on each line. Lines with different word counts can be regrouped. Use reverse lines if you only want to change line order.
Capitalisation does not follow the sentence
The originally capitalised word keeps its capital and ends up at the end. Run the result through sentence case if you need it to read as a proper sentence.
Hyphenated compounds stay together
"state-of-the-art" is one token because there is no whitespace inside it. Replace the hyphens with spaces first if you want its parts reversed individually.
Non-breaking spaces count as whitespace
Text copied from a web page often contains U+00A0 non-breaking spaces. They are matched by \s and treated as separators, which is usually what you want but can surprise you when the output spacing looks different.
Where Word Reversal Is Useful
The output is ordinary text with ordinary spacing, so it goes anywhere without special handling.
Spreadsheets
Reverse one name at a time to produce a "surname first" variant. Pasting a whole column also reverses the row order, and names with different word counts can be regrouped across lines. Do not paste that result over an aligned column.
Language teaching
Reversed sentences are a standard word-order exercise. Because every word stays spelled correctly, students focus on syntax rather than decoding.
Creative writing
Reversing a line is a quick generative constraint. Poets and lyricists use it to find phrasings they would not have reached by intention.
Social captions
A reversed caption reads as a small puzzle while remaining fully copyable, so anyone can paste it back here to unscramble it.
Reasons to Reverse Word Order
Readable scrambling
When you want text to be puzzling rather than unreadable, word reversal hits the right level — the vocabulary is intact and only the order is scrambled.
Building sorting variants
For a single two-part name, word-order reversal gives "last name first name" without a formula. Process names one at a time to keep spreadsheet rows aligned, and add any comma yourself.
Testing whitespace handling
Paste a string with tabs and double spaces to check whether your own reverse implementation normalises whitespace behind your back.
Classroom word games
Reversed sentences have exactly one correct reconstruction, which makes them easy to set and easy to mark.
Frequently Asked Questions
Reversing words means changing the order of words in a sentence. "Hello World" becomes "World Hello". The letters within each word stay exactly as they were.
Reversing text flips every character, so "Hello" becomes "olleH". Reversing words only changes word order. "Hello World" reversed as text is "dlroW olleH", but with reversed words it is "World Hello".
Yes. Paste multiple sentences or paragraphs and the word order reverses across the whole text while the whitespace between words is preserved.
Yes. Punctuation attached to a word travels with that word when the order is reversed, so "Hello," stays as one token.
Yes, exactly. The split keeps the separators, so double spaces, tabs and newlines all reappear in their mirrored positions rather than being collapsed.
Because the word that is now first was never capitalised. Run the output through the sentence case converter to fix the capitalisation.
Yes. Reversing twice restores the original exactly, because the separators are preserved along with the words.
No practical limit. The split-reverse-join operation stays fast on documents well over 100,000 characters.
Related Text Tools
Text Reverser
Compare six backwards-text results side by side from one input.
Backwards Text Generator
Turn any sentence into backwards text, character by character.
Text Inverter
Invert text three ways — backwards, upside down or mirrored — and compare.
Write Backwards Tool
Type forwards and read backwards, plus how to write in reverse by hand.
Sentence Reverser
Reverse a whole sentence or message, by word order or letter by letter.
Letter Reverser
Reverse the letters inside every word while the words stay in place.
Backwards Text Translator
Translate text to backwards and decode backwards text in one pass.
Character Reverser
Code-point-accurate character reversal that keeps emoji intact.