Runs 100% in your browser — nothing is uploaded
Text & String

Reverse Text / Words

Reverse text by character, word, or line order — with correct handling of emoji and multi-byte characters.

Reverse Text / Words
Client-side

About this tool

Reverse Text / Words flips text in three different ways: character reversal (spelling the entire input backwards), word reversal (keeping each word intact but reversing their order), and line reversal (keeping each line intact but reversing the order lines appear in).

Character reversal is deceptively tricky to implement correctly. A naive split-and-reverse operates on UTF-16 code units, which breaks any character represented by a surrogate pair — most emoji end up corrupted. This tool iterates by Unicode code point instead, so emoji, accented characters, and other multi-byte content reverse correctly and remain intact.

For word and line reversal, an additional toggle lets you also reverse the characters within each word or line independently, rather than just reversing their order.

All transformations run instantly and entirely client-side using plain JavaScript string and array operations.

FAQ

Why does reversing emoji sometimes produce broken characters in other tools?
JavaScript strings are UTF-16 internally, and most emoji are stored as two 16-bit surrogate code units. A naive reversal reverses those units independently, corrupting the character. This tool iterates by Unicode code point, keeping surrogate pairs intact.
What is the difference between reversing words and reversing characters?
Character reversal spells the entire string backwards. Word reversal keeps each word spelled normally but reverses their order.
What does the "reverse each word/line's characters too" toggle do?
By default, word and line reversal only reorder the words or lines. Enabling this toggle additionally reverses the characters within each word or line.
Does line reversal reorder within a line or across lines?
Across lines — the last line becomes the first, and so on — while each line's own text stays the same unless the character-reversal toggle is also enabled.
Can I use this to reverse a large document?
Yes, all three modes are simple array and string operations, so even documents with tens of thousands of words process instantly.