Text Reverser

Reverse text by characters, words, lines, or sentences. Unicode-safe — handles emoji and combining characters correctly.

Input
Reversed Text
Paste text above to reverse it.

How to Use the Text Reverser

  1. Paste your text into the input area on the left.
  2. Choose a reversal mode — Characters (full string reversal), Words (reverse word order), Lines (reverse line order), or Sentences (reverse sentence order).
  3. Optionally enable Mirror Text to flip characters to their Unicode mirror equivalents.
  4. 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.

Frequently Asked Questions

Emoji are represented in JavaScript as surrogate pairs — two UTF-16 code units that together represent a single character. If you reverse a string character by character using .split('').reverse().join(''), the surrogate pairs get separated and the emoji become garbled. This tool uses the Intl.Segmenter API to split text into proper Unicode grapheme clusters before reversing, ensuring emoji remain intact.
Character reversal reverses the entire string so the last character becomes the first. Word reversal keeps the characters within each word intact but reverses the order of words — so "Hello World" becomes "World Hello". Line reversal keeps lines intact but reverses their order. Sentence reversal keeps sentences intact but reverses their order in the text.
Combining characters are Unicode code points that modify the preceding character — for example, accent marks, diacritics, and emoji modifiers. A single visually perceived character may be composed of a base character plus one or more combining characters. Reversing without accounting for combining characters separates them from their base, producing garbled output. This tool treats each grapheme cluster as a single unit.
Mirror Text converts each character to its Unicode mirrored equivalent where one exists — parentheses flip direction, brackets reverse, and angle brackets swap. It then reverses the character order, producing text that resembles a mirror reflection. Most letters do not have Unicode mirror forms so they appear reversed but not mirrored.
Yes. In Lines mode, the tool reverses the order of all lines in your input — so you can paste multiple paragraphs and reverse their order in one click. In Characters or Words mode, the entire input is treated as a single block and reversed as a whole. Sentence mode splits on terminal punctuation and reverses the sentence order.