TTKTheTextKit

Text Reverser

Choose a reversal mode, mirror all characters, reverse the word order on each line, or flip lines upside down, then paste your text. Letters with accents, emoji with skin tones, joined emoji and flags stay in one piece when the characters are reversed. It is useful for palindrome tests, backwards text for puzzles, reversing log files, or just having fun. All processing happens in your browser.

Related Tools

[3 suggestions]

Guides for the Text Reverser

About the Text Reverser

The Text Reverser offers three reversal algorithms. Character reversal splits the text into user-perceived characters, called grapheme clusters in the Unicode standard, and reverses the whole sequence. That means a letter written as a base letter plus a combining accent, an emoji with a skin tone, a family of emoji joined by zero width joiners, a country flag made of two regional indicator letters and a Windows line break each stay in one piece. Reversing by code point instead would put an accent in front of its letter, split a family into separate people, and turn the flag of Ukraine into the flag of Australia. Word reversal works on each line, reverses the order of the words and leaves the spaces where they are, so "The quick brown fox" becomes "fox brown quick The" and a line keeps its indentation. Punctuation stays attached to its word. Line reversal reverses the order of the lines, which helps with flipping chronological logs or inverting numbered lists, and it keeps your line endings and a final line break. Each mode keeps all characters exactly: no trimming, case changes or punctuation removal occurs. In a browser without Intl.Segmenter the tool reverses by code point instead. Palindrome enthusiasts use character reversal to verify whether a string reads the same forwards and backwards.

What is the difference between the three reversal modes?▾

Character reversal mirrors the whole text ("hello" becomes "olleh"). Word reversal reverses the word order on each line ("hello world" becomes "world hello"). Line reversal flips the order of the lines so the last line becomes the first.

Does it handle emoji and accented letters?▾

Yes. It reverses text by user-perceived character, so an emoji with a skin tone, a joined emoji such as a family, a flag and a letter with a combining accent stay in one piece instead of falling apart.

Can this be used to check for palindromes?▾

Yes. If the character-reversed text matches the original input exactly, the text is a palindrome. Try it with "racecar". For a sentence such as "A man a plan a canal Panama", remove the spaces and ignore case first.

Are whitespace and line breaks preserved?▾

Yes. In word reversal the spaces between words stay where they were, and each line is reversed on its own. In line reversal your line endings and a final line break are kept, and only the order of the lines changes.