Skip to content
AgileLogics

Reverse Text

Reverses the character order of your text, live as you type.

How it works

Type or paste text into the input panel โ€” the reversed text updates automatically.

How does reversing text work?

Reversing text means writing its characters in the opposite order, so the last character comes first. This tool does it live as you type: stressed becomes desserts, and Hello, world! becomes !dlrow ,olleH. It works on whole Unicode characters rather than bytes, so most emoji survive, but symbols built from several characters, like flags and skin tones, can come apart.

Using the reverser

  1. Type or paste your text into the input box.
  2. Watch the output update as you type. There's nothing to configure.
  3. Click Copy to take the reversed text.

What gets reversed

Everything is one long sequence, including spaces, punctuation and line breaks. That has a consequence people don't always expect with multi-line input: the line order flips as well as the letters.

Input Output
stressed desserts
Hello, world! !dlrow ,olleH
I ๐Ÿ˜€ JS SJ ๐Ÿ˜€ I
line one, then line two on the next line owt enil, then eno enil

If you wanted each line reversed in place, or the words reversed but kept readable, this isn't the tool for it; it treats the whole input as a single string.

Where Unicode trips it up

Under the hood, text in JavaScript is stored as UTF-16, where characters outside the basic range, including most emoji, take two 16-bit units. A naive str.split('').reverse() splits those pairs and produces broken "๏ฟฝ" characters. This tool iterates by code point instead, so a single-code-point emoji like ๐Ÿ˜€ reverses intact.

What a reader sees as one character can still be several code points. Unicode calls that unit a grapheme cluster and defines the rules in UAX #29, Text Segmentation. Reversing code points splits those clusters:

Input What it's made of Reversed output
รฉ (precomposed) 1 code point, U+00E9 รฉ, unchanged
รฉ (decomposed) e + U+0301 combining acute Accent lands before the e, on the wrong letter
๐Ÿ‘๐Ÿฝ Thumbs up + skin-tone modifier ๐Ÿฝ๐Ÿ‘, a colour swatch then a yellow thumb
๐Ÿ‡ฎ๐Ÿ‡ณ Regional indicators I + N ๐Ÿ‡ณ๐Ÿ‡ฎ, the flag of Nicaragua
๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Three people joined by zero-width joiners ๐Ÿ‘งโ€๐Ÿ‘ฉโ€๐Ÿ‘จ, the family drawn in a different order

The flag case is the strangest. A flag emoji is just two letters from a special alphabet spelling an ISO country code, and reversing the letters spells a different code. Canada (CA) turns into Ascension Island (AC), and the US (US) becomes SU, which most systems show as two letter boxes because it isn't a current country code.

Reversing by grapheme in your own code

If you're writing a reverse function yourself, for an interview question or a real feature, reverse grapheme clusters rather than code points. Modern JavaScript has Intl.Segmenter for exactly this:

const reverse = (text) =>
  [...new Intl.Segmenter('en', { granularity: 'grapheme' }).segment(text)]
    .map((part) => part.segment)
    .reverse()
    .join('');

reverse('Hi ๐Ÿ‘๐Ÿฝ ๐Ÿ‡ฎ๐Ÿ‡ณ');   // "๐Ÿ‡ฎ๐Ÿ‡ณ ๐Ÿ‘๐Ÿฝ iH"

That keeps skin tones, flags, families and decomposed accents together. Normalising with text.normalize('NFC') first also helps with accents, because it turns e plus a combining acute back into a single รฉ. The JavaScript overview covers strings and iteration if you want the background.

Things to do with reversed text

  • Check a palindrome. A phrase is a palindrome if it reads the same both ways. For phrases like "Never odd or even", strip the spaces and lowercase it first with the case converter, then compare the reversal with the original.
  • Mirror writing and puzzles. Backwards text is a cheap cipher for treasure hunts and escape-room clues.
  • Inspect tricky characters. If a reversal looks wrong, paste the original into text to hex to see its UTF-8 bytes and spot hidden combining marks.

For text that looks rotated rather than mirrored, the upside down text generator reverses the order and swaps in flipped look-alike characters.

Last updated

Frequently asked questions

Does it reverse words or letters?
Letters. Every character, including spaces and punctuation, is written in reverse order, so Hello, world! becomes !dlrow ,olleH. The order of lines is reversed too, because the whole text is treated as one sequence.
Why did my flag emoji turn into a different country?
A flag is two regional indicator characters that spell a country code. Reversing swaps them, so India (I + N) becomes Nicaragua (N + I), and a code with no matching country shows as two letter symbols instead.
Why did an accent move to the start of the word?
Some accented letters are typed as a base letter plus a separate combining accent. Reversing puts the accent before its letter, where it attaches to the wrong character or nothing. Precomposed letters like รฉ, which are a single character, reverse cleanly.
Do I need to click a button?
No. The output updates live as you type or paste, and Copy grabs the result.
Is my text sent to a server?
No. Reversal happens in JavaScript in your browser and no network request is made.