>_devtools

Reverse Text

Reverse a string by characters (emoji-safe), reverse word order, or reverse the order of lines.

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: hello becomes olleh. Each line is reversed on its own; the line order stays.
  • Word order: one two three becomes three 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.