Reverse Words
Reverse the order of words in your text while keeping each word intact.
Related Tools
About This Tool
Reverses the order of words in input text while preserving the spelling of each individual word. "Hello world" becomes "world Hello". Whitespace tokens are the boundary; punctuation attaches to the adjacent word.
A secondary mode reverses each word's letters individually, producing "olleH dlrow" instead. The two modes can be combined.
The word-level reversal splits input on whitespace boundaries (one or more space, tab, or newline characters), reverses the resulting array of tokens, and rejoins with single spaces. The simplicity belies subtlety in edge cases: trailing whitespace, multiple consecutive spaces, mixed line endings, and punctuation glued to words all influence output. The default behavior treats punctuation as part of the adjacent token, so 'hello, world!' reverses to 'world! hello,'. A toggle splits punctuation into separate tokens, producing 'world ! hello ,' with a more grammatically pure reversal but typically less useful output.
A worked example: 'The quick brown fox jumps over the lazy dog' reverses to 'dog lazy the over jumps fox brown quick The'. The first word's capitalization is preserved at its original position rather than re-capitalizing the new first word, which matches what most users expect for transformation rather than translation. Letter-level reversal of the same input produces 'ehT kciuq nworb xof spmuj revo eht yzal god'. Combined word-and-letter reversal yields 'god yzal eht revo spmuj xof nworb kciuq ehT'.
Limitations are mostly about Unicode complexity. Simple ASCII reversal is straightforward; reversing strings containing combining characters (accented letters, emoji with skin-tone modifiers, family emoji built from multiple code points joined with zero-width joiners) requires grapheme-cluster-aware logic to avoid splitting visual units. The Intl.Segmenter API, available in modern browsers, properly identifies grapheme cluster boundaries and is used internally for letter-level reversal where supported. Older browsers fall back to code-unit reversal, which can corrupt non-BMP characters or split combining sequences. For text in scripts that read right-to-left (Arabic, Hebrew), the visual order is already reversed relative to logical order; reversing again undoes this and produces logically right-to-left text laid out left-to-right, which displays as nonsense.
A palindrome is a sequence that reads the same forward and backward, distinct from the reversal operation here. Testing for palindromes requires comparing the input to its reversal and checking equality (after normalizing case and ignoring non-letter characters for natural-language palindromes). 'A man a plan a canal Panama' is a palindrome under that normalization; the tool reverses but does not test. Common applications of word reversal include Yoda-speak generation (a partial reversal pattern), reverse-the-poem creative-writing exercises, and text-anonymization where order obscures meaning. Letter-level reversal is occasionally useful in cryptography pedagogy as the simplest possible cipher (the Atbash variant uses letter inversion plus alphabet flipping).
The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.