Skip to content
UniKit

Text reverse

Reverse text by character, word, line or inside each line, handling emoji surrogate pairs and combining marks correctly (e + U+0301 counts as one character) so nothing turns into mojibake.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Original text
Reverse by

Reversed output

Reversing by character keeps emoji, combining marks and fullwidth characters whole.

Type text to see the reversed result instantly.

What this tool does

  • Reverse mixed Chinese and English sentences for word games, mirror writing or palindromic checks.
  • Debug string handling by confirming that emoji (👍🏽) and accented letters (é) survive a round trip instead of turning into replacement characters.
  • Reverse the order of lines — for example turn a newest-first log into chronological order before pasting it back.
  • Reverse inside each line to build a mirrored reference text and check that the encoding or font still renders correctly.

Example

Input

Hello 世界 👋

Output

👋 界世 olleH

Reversed by character: the emoji is a surrogate pair and moves as a single unit, so no half code unit is left behind to render as garbage.

Frequently asked questions

Why does reversing emoji with plain JavaScript produce garbage?

JavaScript strings are UTF-16, and an emoji such as 👋 is made of two code units. Reversing by code unit splits the surrogate pair and leaves two unprintable halves. This tool reverses by Unicode grapheme cluster, so surrogate pairs, skin-tone modifiers and ZWJ sequences all move as one unit.

Does é become an e followed by an accent?

No. é exists both as the precomposed code point U+00E9 and as e + U+0301. Both forms are treated as a single grapheme cluster and stay intact after reversing.

What happens to spaces when reversing by word?

Words swap places while the whitespace stays where it is. one two three becomes three two one — the double space stays in its original slot instead of travelling with a word.

Does reversing by line keep CRLF?

The line order is reversed and the output uses LF. If the file must stay CRLF, run the result through the text trim tool and switch the line break back to CRLF.

How much text can it handle?

Everything runs in the browser, so hundreds of thousands of characters are handled instantly. Nothing is uploaded or stored — the text never leaves your machine.

Keywords:reverse textreverse stringreverse linesreverse wordsemoji reverse文本反转字符串反转按行倒序倒序排列emoji 反转

Related tools