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 preserves whitespace exactly, including double spaces, tabs and line breaks. That sounds like a detail until you paste a formatted list and get it back with the indentation intact.
Want each word spelled backwards instead? Reverse each word
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 is left exactly where it was. |
| 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. A pasted list keeps its indentation, and a paragraph with a stray double space comes back with that double space in the mirrored position.
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.
Line breaks reverse the line order too
A newline is whitespace, so reversing the words of a multi-line block also flips which line comes first. Use the reverse lines tool if line order is all you want to change.
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
Reversing the word order of a name column produces a "surname first" variant for sorting. Paste a column, reverse, paste back — the row alignment is unaffected because line breaks are preserved.
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
Word-order reversal is the quickest way to derive "last name, first name" from a plain name list without a formula.
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.