EN

Text Reverser

Reverse characters, lines, inline and words

FAQ

Which reverse modes exist?

Four: characters (whole text), lines (order of lines), each line reversed internally, and word order reversed.

Will Chinese or emoji become garbled?

No. Input is handled as Unicode characters, so multibyte characters are never split mid-sequence.

What is this useful for?

Text easter eggs, palindrome checks, generating test data or inspecting symmetry in a string.

About this tool

The four modes act on different things: reverse characters turns the entire block (newlines included) back to front; reverse lines only flips the order of lines and leaves each line intact; reverse each line flips the characters inside every line while keeping the line order; reverse words flips the word order and leaves the words untouched.

For multi-line text where each line should read backwards, choose reverse each line. Choosing character reversal instead reverses the newlines too, so the last line becomes the first and lines can end up glued together — that mis-selection causes almost every "the output is scrambled" report.

Character reversal splits by Unicode code point (Array.from), so Chinese, Japanese and single-code-point emoji are never cut in half into mojibake — safer than the split('') approach. But grapheme clusters still fall apart: a skin-toned hand emoji separates into hand plus colour swatch, and family or profession emoji built with zero-width joiners break into several separate emoji. No character-level reversal can keep those intact.

Word reversal trims the ends, splits on runs of whitespace and re-joins with a single space — original newlines, indentation and multiple spaces are lost. Fine for titles and keyword shuffling; for code or aligned text use reverse each line instead.