Skip to main content

Reverse Text

Reverse text tools flip your text character-by-character, word-by-word, or line-by-line. While it sounds trivial, Unicode-aware text reversal is non-trivial — multi-byte characters, emoji, and combining diacritics must be handled correctly. Our tool reverses text correctly for all scripts and Unicode.

Original Text

Reversed Text

Reverse Modes

Reverse Characters

Reverses every character in the text. "Hello" becomes "olleH".

Reverse Words

Reverses the order of words. "Hello World" becomes "World Hello".

Reverse Lines

Reverses the order of lines. Last line becomes first.

Share this tool
Text Tools

About the Reverse Text Generator

Reverse text tools flip your text character-by-character, word-by-word, or line-by-line. While it sounds trivial, Unicode-aware text reversal is non-trivial — multi-byte characters, emoji, and combining diacritics must be handled correctly. Our tool reverses text correctly for all scripts and Unicode.

How to use it

  1. Enter any text.
  2. Choose reverse mode: reverse characters, reverse words (keep word order reversed), or reverse lines.
  3. See the reversed output instantly.
  4. Copy with one click.

Formula & methodology

Character reversal: split string into Unicode grapheme clusters (not code points — emoji like flags are multiple code points), reverse the array, rejoin. Word reversal: split on whitespace, reverse word array. Line reversal: split on \n, reverse line array. Naive JS string[...str].reverse() fails for surrogate pairs (emoji); use Intl.Segmenter or a Unicode library.

Common use cases

  • Fun: creating mirror text for social media bios
  • Word puzzles: palindrome checking and construction
  • Steganography: hiding messages in reversed text
  • Typography: right-to-left language experiments
  • Programming: testing string manipulation code with expected outputs

Frequently asked questions

Emoji (and many special characters) are represented in UTF-16 as surrogate pairs — two 16-bit code units that together form one character. Simple array reversal reverses the code units, separating the pair and producing garbled output. Correct reversal must work at the grapheme cluster level: compound emoji like flags (🇺🇸 = two code points), skin tone modifiers, and ZWJ sequences must be treated as atomic units.
A palindrome reads the same forwards and backwards: "racecar", "level", "madam". The longest English palindromes are sentences or phrases: "A man, a plan, a canal: Panama" (ignoring punctuation and spaces). In programming, palindrome detection is a classic interview question solved by comparing the string to its reverse, or using two-pointer convergence. Our reverse tool makes palindrome checking easy.

Related tools

All Tools →

Embed this tool on your site

Free for personal and commercial use. Just copy the snippet below.