HandyBench

Reverse Text

Reverse characters, words or lines.

How to use the Reverse Text

  1. 1 Type or paste your text.
  2. 2 Choose reverse by character, by word, or reverse line order.
  3. 3 Copy the reversed text.

Three buttons, three different reversals

Each button rewrites the text in the box immediately and there is no undo, so copy anything you want to keep first. Because every reversal is its own inverse, pressing the same button twice restores the original text exactly (except that Reverse line order rewrites line endings as plain line breaks).

ButtonWhat it doesInputOutput
Reverse charactersReverses the whole text, line breaks includedHello, World!!dlroW ,olleH
Reverse wordsReverses the order of words on each line, keeping each word and its spacing intactone two threethree two one
Reverse line orderLast line first, first line last; the lines themselves are untouchedline 1, line 2, line 3line 3, line 2, line 1

How it works under the hood

Character reversal splits the text into visible characters (grapheme clusters, using the browser's Intl.Segmenter) and reverses that list. This is better than reversing raw 16-bit units, which would tear emoji into broken halves, and better than reversing code points, which would separate a letter from its accent. In a browser without Intl.Segmenter it falls back to code points. Word reversal splits each line on whitespace but keeps the whitespace as separate items, so double spaces and tabs stay exactly where the gaps were, just mirrored. Because it works line by line, a multi-line text keeps its lines in the same order, and only the words inside each line flip. Reverse line order accepts Windows, Unix and old Mac line endings and writes plain line breaks, so no stray carriage return is left on a line.

Where reversal goes wrong

  • Combining accents and emoji sequences are kept whole. A letter written as e plus a combining acute accent, a thumbs-up with a skin tone and a family emoji built from several joined code points each count as one character, so éa reverses to aé with the accent still on the e.
  • Font support still matters. Reversal never splits a character, but an emoji your device cannot draw as one picture may look different in the reversed text than on a device that supports it.
  • Right-to-left scripts. Arabic and Hebrew text is stored in reading order, so reversing characters produces the opposite of what you might expect visually.
  • Reversed text is not "mirror" text. Letters are not flipped or substituted. For upside-down letters use the upside down text generator.

Typical jobs are palindrome checks (reverse and compare), flipping a chronological list so the newest item comes first, and quick puzzles. Once reversed, run the result through the word counter if you need to confirm that nothing was lost.

Examples

  • ▸ "Hello, World!" → Reverse characters → "!dlroW ,olleH".
  • ▸ "one two three" → Reverse words → "three two one".
  • ▸ Three lines "first / second / third" → Reverse line order → "third / second / first".

Frequently asked questions

What is the difference between reversing characters and words?

Reversing characters turns "hello" into "olleh". Reversing words keeps each word intact but reverses their order in the sentence.

Does reversed text still read correctly when flipped back?

Yes. Pressing the same button again restores the original text exactly, since each reversal is its own inverse. There is no undo button, so copy your original text first if you want to keep it.

Are emojis and accented letters handled correctly?

Yes. Reverse characters works on visible characters (grapheme clusters), so emoji with skin tones, family and flag emoji, and letters built from a base letter plus a combining accent move as one unit and are not torn apart. Very old browsers without Intl.Segmenter fall back to reversing by Unicode code point, which can split such sequences.

What does "Reverse words" do with spacing and multiple lines?

It reverses the order of the words on each line while keeping every word spelled forwards and keeping the original gaps, so a double space stays a double space. Lines stay in their original order, and Windows line endings are preserved; use "Reverse line order" to flip the lines.

Is this the same as upside-down or mirror text?

No. Reversing only changes the order of characters, words or lines; the letters themselves are not flipped or replaced. For upside-down lettering use the upside down text generator.