TextyConverterbeta
⌘K

Reverse Text

Reverse the order of characters in a string. Unicode-safe: surrogate pairs and combining marks stay intact.

0 characters
0 characters

About Reverse Text

The reverser flips your input character-by-character so the last character becomes the first. It uses Array.from on the string before reversing, which correctly handles characters that occupy more than one JavaScript code unit — emoji, mathematical symbols, and most non-Latin scripts. Combining marks (accents, diacritics) that attach to a preceding base character are kept attached.

When to use it

  • Generating palindrome variants for word puzzles or party tricks
  • Reversing a string for a coding exercise without writing the code yourself
  • Producing eye-catching upside-down-looking text in a chat
  • Quick sanity check that a string survives Unicode-aware reversal

How it works

The input is iterated as Unicode code points via Array.from, the resulting array is reversed, and the parts are joined back together. Because surrogate pairs are preserved as a single unit, emoji and characters from astral planes survive the round-trip. Combining-mark sequences are not normalized first, so an accent attached to a letter may end up attached to a different letter — for accent-stable reversal, normalize to NFC first.

Examples

Basic ASCII reversal
Hello, world!
!dlrow ,olleH
Emoji and accented letters stay intact
café 🎉
🎉 éfac

Frequently asked questions

Does it handle emoji correctly?
Yes. Emoji that JavaScript stores as surrogate pairs (most emoji) or as ZWJ sequences (such as 👨‍👩‍👧) are reversed as units rather than being split in half.
Will my accents end up on the wrong letter?
Possibly. Combining marks like ◌́ ◌̈ attach to the character that precedes them. If your input is NFD-normalized, the marks separate from their base letter and may attach to a different one after reversal. Normalize to NFC before reversing if this matters.
Is this the same as Array.prototype.reverse() on the string?
No. String.split("").reverse() splits on UTF-16 code units, which breaks surrogate pairs. This tool splits on Unicode code points first, then reverses, so multi-unit characters survive.
What about right-to-left scripts like Arabic or Hebrew?
Characters are reversed as if they were a left-to-right sequence. Visually, the rendered output will look unusual because the bidi algorithm still applies — the underlying code-point order is reversed, but the visual direction follows the surrounding context.

Related tools