Reverse text: characters, words or lines
Flip a text by characters, by words or by lines.
Calculator inputs
Results
Enter your values and press “Calculate” to see the result.
In short
- What it calculates
- Flip a text by characters, by words or by lines.
- Formula used
Characters: hello → olleh- Example
- The text “level” reversed by characters gives “level”: it is a palindrome.
Reverse text
Reversing text is handy for checking palindromes, flipping a list or creating typographic effects.
Accents and emoji are preserved: whole characters are reversed, not raw bytes.
How it works
In character mode the text is reversed letter by letter; in word mode the order of words changes; in line mode the order of lines is reversed while each line stays intact.
Formula
Characters: hello → olleh
Words: hello world → world hello
Lines: first, second → second, first
Worked example
The text “level” reversed by characters gives “level”: it is a palindrome.
Explanation
Reversing text is not as simple as it looks
Walking a string backwards works fine with basic Latin letters. As soon as composed emoji, letters with separate combining marks or scripts like Hindi or Arabic appear, reversing character by character breaks symbols that are really several codes joined together. The result is empty boxes and stray marks.
Palindromes need normalising first
To check whether a phrase reads the same both ways you must strip spaces, punctuation and accents, and unify case. Only then compare. Without that preliminary step, almost no real palindrome passes the test, because punctuation and accents break the symmetry.
Right-to-left scripts
In Arabic and Hebrew the text already reads right to left. Reversing it does not produce a mirror effect but unreadable text, because the logical order of stored characters does not match the visual order on screen.
What it is used for
As a classic programming exercise, for typographic effects, for checking palindromes and occasionally to obfuscate text trivially, which is not security of any kind.
Frequently asked questions
Does it work with accents and emoji?
Yes. Reversal operates on complete Unicode characters, so neither accents nor emoji get broken.
Can it detect palindromes?
Yes. If the result matches the original ignoring spaces and accents, the text is a palindrome.
Does it work with emoji?
With simple ones yes, but those composed of several joined symbols, such as flags or families, can break when reversed character by character.
How do I check a palindrome?
By stripping spaces, punctuation and accents and unifying case before comparing. Without that step, almost no real phrase tests positive.
Need to calculate something else?
These tools are often used alongside this calculator.
Change case
Turn text into uppercase, lowercase, title case, snake_case or camelCase.
Character count
Characters with and without spaces, lines and bytes in a text.
Remove duplicates
Keep only unique lines, optionally sorted alphabetically.
Word count
Words, characters, sentences and paragraphs in any text.
Reading time
How long a text takes to read, silently or aloud.