Text Reverser
Reverse text by characters, words, lines, or sentences. Unicode-safe — handles emoji and combining characters correctly.
How to Use the Text Reverser
- Paste your text into the input area on the left.
- Choose a reversal mode — Characters (full string reversal), Words (reverse word order), Lines (reverse line order), or Sentences (reverse sentence order).
- Optionally enable Mirror Text to flip characters to their Unicode mirror equivalents.
- Copy or download the reversed text using the buttons above the output.
Reversal Modes Explained
Characters Mode
Characters mode reverses the entire text at the grapheme cluster level. This means the very last character in your text becomes the first, and so on. Unlike naive JavaScript string reversal (which breaks emoji), this tool correctly handles multi-codepoint sequences including emoji (e.g., 👨👩👧 family emoji are composed of multiple code points joined with ZWJ), emoji with skin tone modifiers (e.g., 👋🏽 is two code points), combining diacritics (e.g., é can be "e" + combining acute accent), and regional indicator symbols used for flag emoji. The result is a true mirror of your input at the character level.
Words Mode
Words mode preserves the spelling and characters of each individual word but reverses the sequence of words in the text. Whitespace between words is preserved. For example, "The quick brown fox" becomes "fox brown quick The". This mode is useful for testing text parsers that read words in order, creating word-order puzzles, or reversing lists written as sentences. Punctuation attached to words (like trailing periods or commas) travels with the word it is attached to.
Lines Mode
Lines mode reverses the order of lines in the text without modifying the content of any individual line. This is particularly useful for reversing chronologically ordered data — for example, turning a log file from oldest-first to newest-first, reversing the order of items in a numbered list, or flipping a commit history. Both Unix (LF) and Windows (CRLF) line endings are handled correctly.
Sentences Mode
Sentences mode splits text on sentence-ending punctuation (. ! ?) and reverses the order of sentences while preserving each sentence's internal content. This is useful for text analysis, creating readability puzzles, or testing how content reads when the sentence order is different. The tool handles common edge cases like abbreviations (Mr., Dr.), decimal numbers (3.14), and ellipsis (...).
Unicode and Emoji Safety
Most online text reversers produce broken output for text containing emoji, accented characters with combining marks, or right-to-left script characters. This is because JavaScript strings are sequences of UTF-16 code units, and many characters require two code units (a surrogate pair) to represent. Splitting by code unit and reversing separates surrogate pairs, making emoji appear as question marks or tofu squares. This tool uses the Intl.Segmenter API where available, which correctly identifies grapheme cluster boundaries. On older browsers, a regex-based approach using Unicode property escapes handles the most common cases.
Mirror Text
When Mirror Text is enabled, each character is first converted to its Unicode mirrored equivalent (if one exists) before the reversal is applied. Unicode defines formal mirror images for bracket-like characters: ( becomes ), [ becomes ], { becomes }, < becomes >, and so on. Some mathematical operators and geometric shapes also have mirrors. For Latin letters, no formal mirrors exist in Unicode, but the visual effect of reversed text combined with mirrored punctuation creates a text that resembles a reflection in a mirror — a popular effect for creative writing and social media captions.