How to use Reverse Text
What it does & when you need it
Reversing text sounds trivial until you try it on anything with an emoji, and a naive one-liner mangles the result. This tool reverses text three different ways — by character, by word, or by line — and does the character reversal safely, so astral symbols and emoji survive intact. It updates as you type and copies with a click.
People reach for text reversal for puzzles and ciphers, for flipping a list of lines into the opposite order, for reversing word order in a sentence, or simply to test how their own code handles Unicode. Whatever the reason, it runs entirely in your browser with nothing uploaded.
How to use
- Paste or type into the input buffer, press Sample for a multi-line example, or Upload a text file.
- Pick a mode from Reverse by: Characters, Words, or Lines.
- The reversed buffer updates live. Press Copy result or
Ctrl/Cmd+Enterto copy it.
Things worth knowing
Character reversal is code-point aware. The classic trick,
str.split('').reverse().join(''), splits a string into UTF-16 code units. That
tears a surrogate pair — the two units that make up an emoji — in half, producing
broken output. This tool iterates with Array.from, which walks whole code
points, so a grinning face or a mathematical symbol comes back whole rather than
scrambled.
Word mode reverses order, not spelling. It flips the sequence of words within each line while keeping every word spelled the way you wrote it, and it preserves the spacing and line breaks. Punctuation travels with the word it is attached to, so "hello, world!" becomes "world! hello,".
Line mode flips top to bottom. It reverses the order of the lines and normalises Windows and old-Mac line endings to a plain newline along the way, so a list read bottom-up comes out cleanly.
Note that even code-point-aware reversal can split a grapheme cluster — an emoji with a skin-tone modifier is several code points — so extended sequences may recombine differently. For most text the result is exactly what you expect.
From here you might count the result, sort lines, or change its case.