Reverse Text
Reverse text either by characters (flip the entire string) or by words (reverse word order while keeping each word intact). Handles emoji and multi-byte Unicode characters correctly.
Input
Output
Guides
What does this tool do?
This tool reverses text in two different ways:
- By Characters — flips the entire string back to front.
HellobecomesolleH. - By Words — keeps every word spelled normally but reverses the order they appear in.
Hello World!becomesWorld! Hello.
Paste or type your text, pick a mode, and the reversed result appears instantly — no page reload, no upload.
How to use it
- Type or paste your text into the Input Text box.
- Choose By Characters to flip the whole string, or By Words to reverse word order while keeping each word intact.
- Copy or download the result from the Reversed Text box.
The output updates automatically as you type.
Why character reversal needs care
A naive way to reverse a string in JavaScript is text.split('').reverse().join(''). That works fine for plain ASCII text, but it silently breaks on anything outside the Basic Multilingual Plane's simple characters — emoji, many accented letters formed from combining marks, and characters like 🎉 or 👋 are stored internally as surrogate pairs (two 16-bit code units). Splitting on individual UTF-16 code units and reversing them tears a surrogate pair apart, and the two halves end up in the wrong order relative to each other. The visible result is usually a broken glyph or the "�" replacement character instead of your emoji.
This tool avoids that problem by iterating code points instead of raw UTF-16 units (equivalent to Array.from(text)), so a surrogate pair is always treated as a single unit and moved as a whole. Reversing Hello 👋 World correctly produces dlroW 👋 olleH — the wave emoji stays intact rather than turning into mojibake.
By Characters vs. By Words
Use By Characters for classic "reverse a string" tasks: checking palindromes, generating novelty mirrored text, or simple obfuscation. Use By Words when you want to keep readable words but shuffle their order — for example, reversing the word order of a sentence or title while leaving spelling untouched. Word mode also preserves the original spacing between words, including multiple spaces or tabs, so formatting isn't lost.
Is text reversal useful for anything serious?
Mostly it's for fun, puzzles, and testing — reversed text is a classic way to hide spoilers, create simple word games, or sanity-check that a script or font handles right-to-left-looking strings without corrupting them. It isn't a form of encryption; reversed text is trivial to read back by reversing it again.
Privacy
This tool runs entirely in your browser. Your text is never uploaded to a server.