Home / Text tools / Reverse words

Reverse Words

Reverse the order of the words in a sentence, or keep the order and reverse the letters in each word. Your spacing and line breaks are kept.

Result

Two ways to reverse words

ModeInputResult
Reverse the order of the wordsThe quick brown foxfox brown quick The
Reverse the letters in each wordThe quick brown foxehT 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.

Frequently asked questions

How do I reverse the order of words in a sentence?

Choose Reverse the order of the words and paste the sentence. The last word comes first and the first word comes last.

How do I reverse each word but keep the order?

Choose Reverse the letters in each word.

What happens to punctuation?

Punctuation stays attached to its word. A word with a comma after it keeps the comma when the words change places.

Are my spaces and line breaks kept?

Yes. Only the words change. The spaces between them and the line breaks stay where they were.