Reverse word order
Flip the order of words in a line without touching the spelling of any word.
This tool takes a sentence and puts its words in the opposite order. The quick brown fox comes back as fox brown quick the. Every word keeps its own spelling and stays a normal, readable word — only their positions swap, first to last and last to first. Paste a line, press the button, and read the result back to front.
Runs entirely in your browser. Your text is never uploaded — open DevTools, Network tab, and you will see zero requests while you use this tool.
How to use it
- Paste or type your text into the box above.
- Press Reverse word order.
- The words come back in the opposite order, each still spelled correctly.
- Press Copy to grab the result, or Download .txt to save it.
What this tool does
The tool works in three simple steps. First it splits your text into words wherever there is a space. Then it reverses that list of words so the last word becomes the first. Finally it joins the words back together with single spaces between them. The letters inside each word are never touched, so elephant stays elephant — it just moves to a new spot in the line.
Because the split happens on spaces, punctuation travels with whatever word it is attached to. The sentence Hello, world! becomes world! Hello, — the comma stays glued to Hello and the exclamation mark stays with world. That is usually what you want, though it means a trailing full stop ends up at the front of the reversed line, so you may need to fix punctuation by hand afterwards.
Runs of extra spaces are collapsed, so double spaces and stray tabs will not create empty gaps in the output.
Reverse word order vs reverse text
These sound alike but do very different things. Reverse word order keeps every word readable and only changes their positions. Reverse text (character reversal) flips the individual letters, which turns the whole line into mirror writing. Here is the same input through both:
| Operation | the quick fox |
|---|---|
| Reverse word order (this tool) | fox quick the |
| Reverse text / characters | xof kciuq eht |
So: if you still want to read each word, you want this page. If you want backwards, mirror-style letters, you want our reverse text tool instead.
Examples
A few sentences run through the tool:
| Input | Output |
|---|---|
| I really love this song | song this love really I |
| one two three four five | five four three two one |
| Smith, John | John Smith, |
Notice the Smith, John example. The comma stays attached to Smith, so the raw output is John Smith, with a stray comma on the end. Reversing the word order is the fast part; tidying the leftover punctuation takes a second by hand.
When you need it
- Language exercises. Teachers scramble a sentence into reverse order and ask a student to rebuild the correct one — a quick, self-checking grammar drill.
- Poetry, lyrics and wordplay. Songwriters reverse a line to hear how it sounds backwards, or to find a fresh rhythm.
- Reformatting names. Directory exports often list people as
Surname Given. Reversing word order turns Dupont Marie into Marie Dupont. Works best on two-word names. - Processing short lists. When each item is a single line, flipping the words rearranges tags, keyword phrases or path fragments.
- Puzzles and testing. Building anagram-style puzzles, or checking how a layout copes when a line arrives in an unusual order.
Handling line breaks
If you paste several lines, the tool reverses the words inside each line separately and keeps the lines in their original top-to-bottom order. A three-line list stays three lines; only the words within each line flip. This is deliberate, because it lets you treat a column of names or phrases as a batch and reverse them all at once.
Doing it without this tool
You can flip word order by hand, it is just slower and easy to get wrong on a long line.
Excel or Google Sheets: there is no single built-in function, but you can split on spaces with TEXTSPLIT, reverse the array and rejoin with TEXTJOIN.
A line of code: in Python it is ' '.join(text.split()[::-1]). In JavaScript it is text.split(/\s+/).reverse().join(' '). That single line is exactly what this page runs for you.
Privacy: your text never leaves your browser
The reversal runs in JavaScript on your own device. Your text is not uploaded, not logged and not stored between visits — closing the tab discards it completely. There is no server call to make, so the page keeps working even offline once it has loaded.
Related tools
Frequently asked questions
This tool reverses the order of whole words while keeping each word readable, so "the quick fox" becomes "fox quick the". Reverse text flips the individual letters into mirror writing, turning the same line into "xof kciuq eht".
No. The letters inside every word are left exactly as they are. Only the positions of the words change.
Punctuation stays attached to the word next to it, because the tool splits only on spaces. So "Hello, world!" becomes "world! Hello," — you may need to move a comma or full stop by hand afterwards.
Yes. Each line is reversed on its own and the lines stay in their original top-to-bottom order.
Yes, for simple two-word names it works well: "Dupont Marie" becomes "Marie Dupont". Names with middle names or commas may need a small manual tidy.
No. Double spaces, tabs and other runs of whitespace are collapsed so the result has a single clean space between each word.
No. Everything runs in your browser, the text is never uploaded or stored, and the page works offline once loaded.