Text Reverse text
Reverse text by character, by word order or by line order, with the character reversal handling emoji and accents correctly.
Ready. Runs locally on your device.

Your files stay on your device. The tool works directly in your browser, using your device to process your files. Nothing is sent to our servers, and we never receive, store, or see your files or figures.
Share result
Cite
Cite this page
Reembun. (2026, July 28). Reverse text. https://reembun.com/reverse-text
How to use it
Paste your text
Everything happens in the box in front of you, in this tab.
Choose what to reverse
Characters flips the letters, word order flips the words in each line, and line order flips the lines in the block. They can be combined.
Or sort instead
Line order also offers A to Z and Z to A, which turns the same box into a quick sorter.
Copy the result
The counters underneath show characters and lines before and after, so you can see nothing was lost.
Three kinds of reversal
Characters: hello world becomes dlrow olleh. Every character in the whole text is flipped.
Word order: hello world becomes world hello. The words are unchanged; their order is reversed. Whitespace between them is preserved, so formatting survives.
Line order: the last line becomes the first. This is the one with the most everyday use: reversing a log, a chronological list, or output that came out in the wrong direction.
Why character reversal is harder than it looks
The obvious implementation is text.split('').reverse().join(''). It is wrong for anything outside basic ASCII.
JavaScript strings are stored as UTF-16, where characters outside the basic range occupy two units. Splitting on '' separates those units, and reversing them produces an invalid pair:
| Input | Naive reversal | Correct |
|---|---|---|
abc | cba | cba |
a๐b | b<broken>a | b๐a |
hรฉllo | may split the accent | ollรฉh |
This tool splits by code point rather than by code unit, which keeps emoji and precomposed accented characters intact.
Combining marks remain a genuine edge case. A character written as a base letter plus a separate combining accent will have the accent reversed onto the wrong letter, because the two code points are independent. Text in NFC normalised form, which most text is, avoids this.
Reversing lines
The most practically useful of the three. Common uses:
- Turning a newest-first log into oldest-first
- Reversing a list that was pasted in descending order
- Flipping a chronology without re-sorting
Because it operates on line boundaries, it composes well with the other cleanups on this tool: deduplicate first, then reverse, then trim.
Checking a palindrome
Reversing characters and comparing to the original tells you whether a string is a palindrome. For a fair comparison you usually want to strip punctuation and ignore case first, which the cleanup options here can do before the reversal runs.
A man, a plan, a canal: Panama is a palindrome only after removing punctuation and lowercasing.
Right-to-left scripts
Reversing Arabic, Hebrew, Persian or Urdu produces something technically correct and visually meaningless. The display engine applies bidirectional layout on top of whatever order the characters are in, and reversing the underlying string fights that rather than cooperating with it. The output will not be the visual mirror you expect.
Common questions
Why do some tools break emoji when reversing?
Because they reverse UTF-16 code units rather than characters. An emoji occupies two units, so reversing them separately produces an invalid pair that renders as a replacement character. This tool splits by code point, which keeps emoji and most accented characters intact.
What is the difference between reversing characters and words?
Reversing characters turns "hello world" into "dlrow olleh". Reversing word order turns it into "world hello". They are different operations and people usually want the second when they say "reverse".
Does this work for Arabic or Hebrew?
Reversing right-to-left script produces text that is technically reversed but visually confusing, because the display engine also applies bidirectional layout. For RTL languages the result is rarely what anyone wants.
What is it actually used for?
Testing how software handles unusual input, creating simple puzzles, checking palindromes, and reversing a list that came out in the wrong order. Reversing line order is the one with genuine everyday use.
Last reviewed
