What this does
Reverses text in one of three ways: the characters in each line, the order of the words in each line, or the order of the lines.
Why a plain reverse breaks emoji
Reversing a string with a simple loop reverses its UTF-16 code units, which splits emoji and tears accents away from their letters. This tool reverses by grapheme (what a reader sees as one character, via Intl.Segmenter), so café 👨👩👧 reverses to👨👩👧 éfac, with the family emoji and the accent intact.
Modes
- Characters:
hellobecomesolleh. Each line is reversed on its own; the line order stays. - Word order:
one two threebecomesthree two one. Spacing between words is moved along with them. - Line order: the last line becomes the first.
Right-to-left scripts such as Arabic and Hebrew are reversed in storage order like any other text; this does not change how the browser displays them.
Privacy
This runs entirely in your browser. Nothing is uploaded.