Reverse Text — Backwards Letters, Words or Lines

Flip characters, words or lines — instantly, right in your browser.

Three different reversals

Reversing characters turns "hello world" into "dlrow olleh". Reversing words gives "world hello" with each word intact. Reversing lines leaves every line alone and flips their order, which is what you want for a log read newest-first.

Why naive reversal breaks emoji

JavaScript strings are sequences of UTF-16 code units, not characters. An emoji is often two units, and a flag or a family emoji is several joined together. Reversing the units splits them into fragments that render as unrelated symbols or as nothing at all.

The same applies to accented letters written as a base letter plus a combining mark: reversed carelessly, the accent lands on the wrong letter. Reversal here works on grapheme clusters, so what looks like one character is treated as one.

Frequently asked questions

Why do emoji break when other tools reverse text?

They reverse UTF-16 code units rather than characters. An emoji is often two or more units, so reversing them splits it into fragments.

Can I reverse the order of lines only?

Yes — line mode keeps each line intact and flips their order, which is what a log usually needs.

Does it work with Arabic or Hebrew?

The characters reverse correctly, but those scripts are already displayed right-to-left, so the visual result is rarely what people expect.

Something wrong with this tool, or an idea for it? Tell us