Three different operations, one word

Reverse means at least three things, and picking the wrong one is the commonest reason the output looks nothing like what was wanted:

OperationInputOutput
Reverse charactershello worlddlrow olleh
Reverse word orderhello worldworld hello
Reverse each word in placehello worldolleh dlrow

Line reversal is a fourth, and it is the one with the most practical use — flipping a log file so the newest entry sits at the top.

Character reversal is much harder than it looks

For plain English, reversing a string is a first-week programming exercise. For real text it fails at four distinct levels, and each level produces a different flavour of wrong.

Level one — storage units. Most languages store text as UTF-16, in which characters outside the basic multilingual plane occupy two units called a surrogate pair. Reversing unit by unit splits every pair and puts the halves in the wrong order. Each half is meaningless alone, so a thumbs-up emoji does not come back reversed — it comes back as two replacement boxes. The data is destroyed, not rearranged.

Level two — combining marks. An accented letter can be stored as one character or as a base letter followed by a separate combining mark. Reverse the second form and the mark detaches from its letter and lands on the neighbour. The word café, written with a combining acute, reverses so that the accent appears over the f. Nothing errors; the text is simply wrong in a way that is easy to miss in a long string.

Level three — sequences whose order is the meaning. Flag emoji are built from two regional indicator letters standing for a country code. Reversing them does not break the flag — it silently produces a different valid flag:

LettersFlagReversedBecomes
S ESwedenE SSpain
U AUkraineA UAustralia

This is the most instructive failure on the page, because there is no error, no replacement character and no visual clue. The output is well-formed and means something else.

Level four — joined sequences. A family emoji is several person characters bound together by invisible zero-width joiners. Reversing the sequence rearranges which characters the joiners sit between, so the group either falls apart into separate figures or recomposes as a different family. Skin-tone modifiers behave the same way: the modifier must follow its base character, and reversal puts it in front of the wrong one.

Several writing systems compound the problem. In Devanagari and Thai, certain vowel signs are stored after the consonant they are pronounced before, so reversal produces sequences that cannot be rendered at all.

How to do it correctly

Reverse byPlain EnglishEmojiAccentsFlags
Storage unitCorrectDestroyedMisplacedWrong flag
Code pointCorrectScrambledMisplacedWrong flag
Grapheme clusterCorrectCorrectCorrectCorrect

The right unit is the grapheme cluster — what a reader would call one character. Modern browsers expose this directly through the internationalisation segmenter, which splits text into clusters that can then be reversed as a list. That single change fixes all four failure levels at once, and it is why a correct reverser and a naive one give different output on the same input.

Right-to-left text is a separate question

Reversing Arabic or Hebrew is not the mirror-image operation it is for English. Those scripts are stored in logical order — first letter read, first in memory — and the right-to-left display is applied at render time. So reversing the stored characters does not flip the display; it changes the text into a different, usually nonsensical, sequence. Mixed text is stranger still, because a bidirectional algorithm already reorders runs for display, and reversal interacts with it unpredictably.

That gap between stored order and displayed order has a security dimension worth knowing about defensively. Unicode includes explicit direction-override characters, and inserting one into a filename or a link can make the visible text read differently from the actual data — a file that displays as an image can be an executable. Several code-review and messaging tools now flag these characters for exactly this reason. The lesson for anyone handling untrusted strings is that what is displayed is not evidence of what is stored.

Reversal is not obfuscation

Worth stating flatly, because it is often suggested: reversing a password or a secret provides no protection at all. It adds zero entropy, since the transformation is public and has no key, and reversal is one of the standard rules that password-cracking software applies to every candidate in its wordlist by default. A reversed dictionary word is a dictionary word. If the aim is a strong password, the requirement is randomness, not rearrangement.

The same applies to reversed text as a way of hiding content from moderation or search — it is trivially undone, and the systems in question already handle it.

What it is genuinely useful for

Honest limits

Character reversal is mechanical and knows nothing about language. It will not produce readable mirrored text, and it is not the same thing as upside-down text — that effect is made by substituting entirely different Unicode characters that happen to resemble inverted letters, which is a lookup table rather than a reversal.

Both reversed and substituted text carry a real accessibility cost. A screen reader announces the characters it is given, so reversed text is read as gibberish and substituted upside-down text is read as whatever those unrelated characters actually are. Neither is searchable, neither can be selected meaningfully, and neither should be used for anything a reader needs to understand — including social media names and bios, where it is most common.

Questions people actually ask

Why did my emoji turn into question marks?

The reverser worked on storage units and split a surrogate pair. Nothing can recover it from the output; reverse the original again with grapheme-cluster handling.

Why did the accent move to a different letter?

Because it was stored as a separate combining mark rather than as part of a precomposed character. Normalising the text to its composed form before reversing avoids this.

Is reversed text a reasonable password trick?

No — see above. Cracking tools apply reversal automatically, so it buys nothing.

Is my text stored?

No. Reversal happens in your browser and nothing you paste is transmitted or saved.

Keep exploring Gen Code Tools

Every tool comes with a written guide, and every category is one click away.