Reverse a string, word order, or line order
Palindrome checks, flipped word order, last-line-first output — three reversal modes for a pasted block.
Tools used in this guide
The job
You need text backwards for a palindrome test, word order flipped for a teaser, or a log printed last-first. Three different reversals — which one you want depends on the task.
Pick a mode
Characters reverses the whole string code-point safe. Word order keeps each word intact but flips their sequence — spaces and newlines stay where they were. Line order flips the lines themselves, bottom to top, leaving each line readable.
- Character mode is grapheme-safe: a family emoji reverses as one unit, not a scramble of code points.
- Use word order for 'the quick brown fox' → 'fox brown quick the' without touching punctuation inside words.
Worked example
Checking a 14-line list sorted newest-last? Line order flips it to newest-first for review, then flip it back before pasting.
Where it stops
It's mechanical reversal — no anagram solving, no spell-correction after the flip. Word-order mode treats any whitespace run as a separator. Up to 200,000 characters.