Reverse Words
Reverse the order of words in your text - per line or across the whole block - and optionally flip the letters in each word too. Runs in your browser.
- Free, no account
- No watermark
- No usage limit
About the Reverse Words
Type "reverse words" into a search box and you get two different jobs wearing one name. This page does the word ORDER. "Meet me at noon" comes back as "noon at me Meet", with all four words still spelled forward. The other job flips the letters instead, so the same line turns into "noon ta em teeM", and for that one you want our reverse text tool.
The flip here runs both ways. On the default Per line scope I pushed 21 different strings through the box, fed every result straight back in, and 21 of 21 came back byte for byte identical to what went in. Aligned columns, tab stops, blank lines, the three spaces you put there on purpose. Flip a block, look at it, flip it back, and you have exactly what you started with. Nothing you paste leaves your browser either.
How to use
- Paste or type into the Input box. The result updates on every keystroke, so there is no run button to hunt for.
- Pick the scope. Per line flips the words inside each line and leaves every line where it is. Whole text reads the entire paste as one run and hands back a single line.
- Decide about the letters. By default only the order changes. Tick Also reverse the letters in each word to get each word spelled backward on top of the reordering, which is the setting for puzzles and answer keys.
- Copy or clear. Copy result takes the output, Clear empties the input. The output box is read only, so a stray click cannot scramble what you just made.
What this tool calls a word
Whitespace, and nothing else. That is the entire rule, and it is worth knowing before you paste something unusual.
I probed it one character at a time, the letters alpha, then a candidate character, then beta, reading the word count straight off the tool. Twenty five different invisible characters split that into two words. The plain space, the tab, the line break, the carriage return, the no break space at U+00A0, the ideographic space at U+3000 that unspaced Asian text often uses, and nineteen more. Every one of them came back as itself on Per line, so a no break space is still a no break space after the flip rather than quietly becoming an ordinary space.
Four invisible characters do the opposite and glue a word together: zero width space (U+200B), zero width non joiner (U+200C), the soft hyphen (U+00AD) and the word joiner (U+2060). Paste hello, a zero width space, then world, and the counter says one word and the output matches the input.
Everything else counts as part of a word, punctuation included.
state-of-the-artis one word. "a state-of-the-art design" reverses to "design state-of-the-art a", so three words, not six.don'tis one word, and so isdon’twith the curly apostrophe at U+2019. Different character, same answer.- Punctuation rides along with whatever it is attached to. "hello, world" comes back as "world hello,". With the letter box off it moves things around and changes nothing else.
- Text with no spaces in it, which is most Chinese and Japanese, is a single word. There is nothing to reorder, so Per line hands it back untouched.
Per line and Whole text, and what each one costs
Take this block, 39 characters over two lines:
apples oranges pears
red green blue
Per line returns it at 39 characters:
pears oranges apples
blue green red
The triple spaces moved along with their neighbors and two lines stayed two lines. Whole text on the same block returns blue green red pears oranges apples, which is 35 characters. The four missing ones are the extra spaces in the two wide gaps. Whole text squeezes every run of whitespace down to a single space, and it turns the line break into a space too. That is on purpose, since the mode is already discarding the line structure.
Whole text trims the ends too. Three leading and three trailing spaces around "lead and trail" is 20 characters going in and 14 coming out, and an input of nothing but three spaces comes back empty. Per line keeps all six spaces in the first case and hands the three back in the second.
So if the lines mean something on their own, rows of a list, separate records, stanzas, stay on Per line. If the breaks are only where your editor happened to wrap, Whole text gives you the real reversed order across the lot. Per line is the safe place to start, since that scope on its own never drops a character.
Run it twice and you should get your text back
That is the test worth caring about, because a tool that quietly tidies your text is a tool you cannot trust with a second pass. Same 21 strings, reversed twice, compared against the original:
- Per line, letters off: 21 of 21 came back identical.
- Per line, letters on: 20 of 21.
- Whole text: 12 of 21.
The nine that failed on Whole text are the spacing cases above, which is that mode doing its job rather than a fault.
The single failure with the letter flip on is the honest catch on this page. Some editors and some keyboard layouts store an accented letter as the plain letter followed by a separate accent mark, which makes a four letter word like café five characters long. Send that spelling of café menu through with the letter box ticked and the accent comes back as one combined é instead, ten characters in and nine characters out. On screen it is the same word in the same place, and to a file comparison it is a different file. Leave the letter box unticked and that same string round trips perfectly, so the rewrite only happens when the tool is taking words apart to reverse them.
When to reach for it, and when not to
A ranking or a queue pasted in the wrong direction. Sentence unscramble drills for a class. The archaic word order some writers use as a starting point before tidying by hand. Feeding word reversed input to something you are testing, to see how its wrapping copes with sentences that make no sense.
Size is not a reason to hesitate. I pasted a block of 1,239,999 characters across 40,000 lines and 200,000 words. The output came back at 1,239,999 characters with nothing truncated, and a second pass returned the original block exactly.
What it will not do is repair the grammar afterward. "the dog chased the cat" reverses to "cat the chased dog the", which is what a word order flip is supposed to produce even though it reads as nonsense. Reordering is mechanical, and making the result read well is the part you do yourself. That is also why a short phrase is usually quicker to retype than to paste. If what you want is the lines in a different order rather than the words inside them, sort text lines has a reverse option for that.
Frequently asked questions
My output is unreadable. What did I do?
Two candidates. Either Also reverse the letters in each word is ticked, so every word came back spelled backward on top of the reordering, and unticking it makes the words readable again. Or you wanted a straight character flip from the start, which is a different page, reverse text.
It moved the numbers to the end of my list rows. Is that expected?
Yes, and it catches people out. To this tool a list marker is a word like any other, so 1. flour becomes flour 1. because "1." is a two character word sitting at the front of the line. Nothing is lost, everything just moved, and a three row list goes in at 27 characters and comes out at 27. To keep the numbering where it is, strip it with find and replace first and put it back after.
Does it keep emoji and accented letters in one piece?
It does. A family emoji is assembled from four people and three invisible joiners, and it comes back as the same family rather than four strangers. Devanagari survives as well, किताब reverses to बताकि with the vowel marks still sitting on the right letters. The only thing to watch is the accent rewrite described above, and that one needs the letter box ticked before it can happen.
How much can I paste, and do the counters describe the input or the output?
There is no cap in the tool, and the biggest block driven through it was 1.2 million characters. The Words and Lines readouts above the output describe what you typed, not what came out. That matters on Whole text, where the readout can say two lines while the result is a single line.
Why is my Japanese or Chinese text coming back exactly as I typed it?
Because there are no spaces in it, so the tool counts 今日はいい天気です as a single word, and one word has no order to reverse. Tick the letter box and you get すで気天いいは日今, the same characters running the other way. Nothing here will reorder the phrases the way a Japanese reader would. Working out where one word ends and the next begins in unspaced text is a separate problem, and this tool does not attempt it.
Is anything uploaded, and does it work offline?
No, and yes. The reversing happens on your own machine, nothing is sent, logged or stored. The page has nothing left to fetch once it has loaded, so it keeps going with the connection switched off. Close the tab and your text is gone with it.