Text Reverser

Reverse text by character, word or line, with correct emoji handling.

Output updates as you type.


Result will appear here.

Features

  • Four reversal modes
  • Grapheme-aware, emoji and combining accents stay intact
  • Automatic palindrome detection
  • Feed the result back in with one click

How to use it

  1. Type or paste your text.
  2. Choose what to reverse: characters, words or lines.
  3. The result updates immediately.
  4. Copy it, or press Use result as input to reverse again.

Why reversing a string is harder than it looks

The obvious approach, str.split('').reverse().join(''): is subtly broken. JavaScript strings are sequences of UTF-16 code units, and any character outside the Basic Multilingual Plane occupies two of them. Splitting on code units tears those pairs apart, so reversing a string containing an emoji produces replacement characters instead of the emoji.

Combining marks cause a second problem. The letter é can be a single code point, or it can be a plain e followed by a combining acute accent. Reverse the second form naively and the accent detaches, landing on whatever character now precedes it. Flag emoji, skin-tone modifiers and family sequences are made of several code points joined by zero-width joiners and break the same way.

This tool uses Intl.Segmenter where the browser supports it, which splits text into grapheme clusters, what a reader would call a character, rather than code units. Where it is unavailable, it falls back to a code-point split, which at least keeps surrogate pairs together. That handles emoji correctly even if some exotic combining sequences still shift.

Frequently asked questions

Yes, completely. Text Reverser is free with no usage limits, no account and no sign-up. There is no paid tier and no trial that expires. Tools marked Premium on this site carry that label to indicate a deeper feature set, not a price.
Text Reverser covers four reversal modes, grapheme-aware, emoji and combining accents stay intact, automatic palindrome detection, among other things. Everything is available immediately with no account, no sign-up and no usage limit.
The obvious approach, str.split('').reverse().join(''): is subtly broken. JavaScript strings are sequences of UTF-16 code units, and any character outside the Basic Multilingual Plane occupies two of them. Splitting on code units tears those pairs apart, so reversing a string containing an emoji produces replacement characters instead of the emoji.
Everything happens inside your browser. The text you enter is processed by JavaScript running on your own device and is never sent to a server, there is no backend to send it to. You can confirm this in your browser's Network tab while you use the tool. Because nothing depends on a server, the tool also keeps working offline once the page has loaded, the site registers a service worker that caches it after your first visit.

Related tools

Further reading

📖 How to Reverse Text, Words, or Lines (and Why You'd Want To)

Read the full guide on the 123MiniApps blog.

Pick a theme

Ten hand-tuned palettes.