Text Transform

Reverse words

What to do

Transformed in your browser · nothing is uploaded

Local · spacing preserved, not normalised
Advertisement
320 × 100

Puts the words in the opposite order while every word stays spelled the way it was: "one two three" becomes "three two one". Reversing the characters instead, which gives "eerht owt eno", is the second option, and reversing the order of whole lines is the third.

How to use the reverse words

1 Paste a sentence, or a whole block of text.
2 Reverse word order is the default; characters and lines sit beside it.
3 Read the result — punctuation travels with the word it is attached to.
4 Copy it out.

The text is split into words and the gaps between them, and the whole sequence is turned round. Gaps included. So the spacing is preserved but mirrored: one two three, with a double space after the first word, comes back as three two one, with the double space now before the last. Nothing is normalised on the way through, which is why carefully spaced text can look odd afterwards. Punctuation is part of whatever word it is attached to, so hello, world becomes world hello, with the comma still trailing.

A line break counts as a gap too, so a multi-line block is reversed as one long sequence rather than line by line: the last word of the last line ends up first, and the breaks land in mirrored positions. Reverse line order is the option that keeps each line intact. If what you want is each word spelled backwards but in its original position, that is two passes: reverse the characters, then reverse the word order, and one two comes back as eno owt. Right-to-left scripts are the awkward case: the tokens really are reordered, but the browser lays out Arabic and Hebrew by its own rules, so the result on screen may not look reversed at all.

Questions

Word order keeps every word readable. Character reversal spells the lot backwards; one two three becomes eerht owt eno.

MDN, working with strings
Advertisement
300 × 250
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding