Free Text Reverser
Reverse any text backward by characters, words, or lines. The character mode is emoji-safe, so flags, skin-tone, and multi-byte symbols stay intact instead of breaking into garbled boxes.
dlroW olleH
Quick answer
To reverse text, paste it into the box and choose a mode: by characters reads the whole string right to left, by words keeps each word readable but flips their order, and by lines flips the top-to-bottom order. Character mode uses Array.from so emoji and surrogate-pair symbols are reversed safely without corruption.
Formula & method
Reverse by characters
output = Array.from(input).reverse().join("")- input β the original text string
- Array.from β splits text into Unicode code points so emoji stay whole
- output β the input read right to left, character by character
Array.from is used instead of split("") so surrogate-pair emoji are not broken in half.
Reverse by words
output = input.trim().split(/\s+/).reverse().join(" ")- input β the original text
- /\s+/ β whitespace separator (spaces, tabs, newlines)
- output β same words, spelled normally, in reversed order
Reverse by lines
output = input.split(/\r?\n/).reverse().join("\n")- input β the multi-line text
- /\r?\n/ β line break (handles both \n and \r\n)
- output β the same lines in bottom-to-top order
The tool offers three independent reversal modes. In character mode the input is split into an array of Unicode code points with Array.from(input) rather than input.split("") β this keeps emoji and surrogate pairs (characters above U+FFFF) intact β and the array is reversed and re-joined, so the text reads exactly right to left. In word mode the string is split on whitespace (/\s+/), the resulting word array is reversed, and the words are re-joined with single spaces, so each word stays spelled correctly but the order is flipped. In line mode the input is split on newlines (/\r?\n/), the line array is reversed, and the lines are re-joined with newline characters, flipping the document top to bottom. All processing runs locally in your browser as you type; nothing is uploaded.
Examples
- Input
- hello
- Result
- olleh
- Why
- In character mode each letter is read right to left: h-e-l-l-o becomes o-l-l-e-h.
- Input
- Hi π
- Result
- π iH
- Why
- Array.from keeps the waving-hand emoji as a single unit. The code points reverse to emoji, space, i, H, giving "π iH" with the emoji fully intact.
- Input
- the quick brown fox
- Result
- fox brown quick the
- Why
- Word mode flips the order of the four words while each word keeps its normal spelling, producing "fox brown quick the".
- Input
- apple banana cherry
- Result
- cherry banana apple
- Why
- Line mode reverses the top-to-bottom order, so the last line (cherry) moves to the top and the first line (apple) moves to the bottom.
- Input
- racecar
- Result
- racecar
- Why
- Reversing "racecar" by characters yields the identical string, which confirms it is a palindrome.
When to use this tool
- Checking whether a word or phrase is a palindrome by reversing it and comparing.
- Creating mirror-text or backward-text effects for puzzles, art, bios, or social posts.
- Flipping the order of a list, log, or numbered set of lines from top-to-bottom to bottom-to-top.
Common mistakes
- Using character mode when you actually want each word to stay readable β pick word mode to flip word order without spelling words backward.
- Assuming a plain split("").reverse() handles emoji; it splits surrogate pairs and corrupts symbols, which is why this tool uses Array.from for character mode.
- Forgetting that line mode keeps each line's text unchanged β it only flips the order of lines, not the characters within them.
Frequently asked questions
How do I reverse text online?
Paste or type your text into the box above and choose a reversal mode β by characters, by words, or by lines. The reversed result appears instantly and you can copy it with one click. Everything runs in your browser, so nothing is sent to a server.
What is the difference between reversing by characters, words, and lines?
By characters reads the entire string right to left (hello β olleh). By words keeps each word spelled normally but flips their order (one two β two one). By lines keeps each line's text but flips their top-to-bottom order. Choose the one that matches what you want flipped.
Does this tool reverse emoji correctly?
Yes. Character mode uses Array.from, which splits text by Unicode code points instead of UTF-16 units, so emoji, flags, and other surrogate-pair symbols are reversed as whole characters and never break into garbled boxes.
Can I use a reversed string to check for a palindrome?
Yes. Reverse your text in character mode and compare it to the original. If they match exactly, the text is a palindrome β for example, "racecar" reversed is still "racecar".
Is my text uploaded anywhere?
No. All reversing happens locally in your browser with plain JavaScript. Your text never leaves your device, which makes the tool safe for private notes, drafts, and sensitive content.
Why does reversing by words add or change spacing?
Word mode splits on any run of whitespace and re-joins the words with a single space, so irregular spacing, tabs, or double spaces between words are normalized to single spaces in the output.
Sources & references
External references open in a new tab. We are independent and not affiliated with these organizations.
- β Free to use
- β No sign-up required
- β Runs entirely in your browser β nothing is uploaded.
- β Formula and method shown above
Provided βas isβ for general information only β results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.
Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.
Related tools
Embed this tool on your site
Free to embed, no sign-up. Paste this code where you want the text reverser to appear: