Two ways to reverse words
| Mode | Input | Result |
|---|---|---|
| Reverse the order of the words | The quick brown fox | fox brown quick The |
| Reverse the letters in each word | The quick brown fox | ehT kciuq nworb xof |
The first mode moves whole words and does not touch what is inside them. The second keeps every word in its place and writes it backwards.
What counts as a word
A word is any group of characters between spaces or line breaks. Punctuation stays attached to the word it touches, so hello, becomes ,olleh when the letters are reversed and keeps its comma next to hello when only the order is reversed. If you want punctuation treated separately, remove it first with a find and replace tool.
Spacing and lines
- The spaces and tabs between your words stay exactly where they are. Only the words change places.
- With Reverse each line separately turned on, which is the default, each line is handled on its own, so a line of text stays a line. Turn it off to reverse the words across the whole text, so that the last word of the last line becomes the first word of the first line.
Uses
- Word puzzles and tongue twisters.
- Checking how a sentence reads in reverse order, a trick used in proofreading.
- Programming exercises, such as the classic task of reversing the words in a string.
- Names written in the order of surname first, such as Smith John to John Smith, when the name has two words.
To reverse the letters of the whole text, use reverse letters. To reverse the lines of a list, use reverse lines. All seven modes are on the reverse text page.