Reverse Text
Reverse any text β by character, by word, or by line. Handles emoji and multi-byte Unicode correctly.
Last updated: April 2026 Β· Runs in your browser Β· No sign-up
Technical notes
In JavaScript, "π".length returns 2 because the emoji is encoded as two UTF-16 code units. Naively splitting and reversing corrupts the character. This tool uses Intl.Segmenter to split by grapheme cluster β the user-perceived character β so every visible symbol survives the flip.
Frequently Asked Questions
Does it handle emoji correctly?
Yes. A naive string.reverse() breaks emoji that are stored as surrogate pairs (e.g. πΊπΈ is actually two characters). We use a grapheme-aware splitter so ππ reverses to ππ, not a garbled mess.
What's the difference between word and character reversal?
Character: 'hello world' β 'dlrow olleh'. Word: 'hello world' β 'world hello'. Line: reverses the order of lines but not their contents.
What's a practical use?
Creating mirrored text for design, generating palindrome tests, or obfuscating strings in a playful (not secure) way.
Does it reverse right-to-left scripts?
Arabic and Hebrew already flow right-to-left; reversing them visually moves characters left-to-right, which usually breaks rendering. Reverse RTL text with caution.