Skip to content
Everyday Utilities Free • No signup • Instant results

Text Reverser

Reverse text by characters, words or lines.

About the Text Reverser

The Text Reverser flips your input in one of four ways: character-by-character (so “Hello” becomes “olleH”), word-by-word (so “Hello World” becomes “World Hello”), line-by-line (which reverses the order of lines without touching their content), or a combination that reverses the order of words within each line while preserving their internal character order. Each mode has distinct real-world uses, from obfuscation puzzles to data reordering.

Character reversal is the classic “mirror text” operation used in puzzles, scavenger hunts, and linguistic games. Word reversal preserves readability but changes emphasis — the last word becomes the first, which can be useful when you want to flip the focus of a sentence without rewriting it. Line reversal reorders paragraphs or list items, which is handy when you want to read a thread or chat log from newest to oldest.

The tool handles multi-byte Unicode characters correctly by using the spread operator ([...t]), which iterates over code points rather than UTF-16 code units. This means emoji, CJK characters, and accented letters survive reversal intact rather than being broken into half-characters.

How It Works

Character reversal uses [...t].reverse().join(''). The spread operator splits the string into an array of Unicode code points (not UTF-16 code units), so surrogate pairs that compose emoji like 😀 stay together. This avoids the classic JavaScript bug where '😀'.split('').reverse().join('') produces a broken pair of replacement characters.

Word reversal splits on /(\s+)/ (a capturing group) and rejoins. The capturing group preserves the original whitespace between words — tabs stay tabs, double spaces stay double — so the layout is faithfully reproduced in reverse order. Without the capturing group, all whitespace would collapse to single spaces.

Line reversal is the simplest: t.split('\n').reverse().join('\n'). It preserves trailing newlines, leading whitespace, and any line-internal content exactly. The combined mode reverses the order of words within each line, then reverses the characters of the resulting string — useful for double-obfuscation puzzles where you want both word order and character order flipped.

Worked Examples

The default text contains three lines. Character reversal produces “god yzal eht revo spmuJ\n xof nworb kciuq ehT\n dlroW olleH” — each line reads right-to-left, but the lines themselves stay in the original order. Word reversal yields “World Hello\n fox brown quick The\n dog lazy the over Jumps” — words are flipped within each line, but each word still reads normally. Line reversal produces “Jumps over the lazy dog\nThe quick brown fox\nHello World” — the third line is now first.

For a single sentence like “The quick brown fox” with character reversal, you get “xof nworb kciuq ehT” — useful for generating puzzle clues or mirror-image text in design work. Word reversal gives “fox brown quick The” — same words, different emphasis, which can be a creative writing prompt.

If you paste a chat log where the most recent message is at the bottom, line reversal flips it so the newest message appears at the top — matching the convention of social media feeds. This is a common need when exporting chat transcripts for legal or archival review.

When to Use This Tool

  • Creating obfuscated puzzle text for scavenger hunts or escape rooms.
  • Reordering chat logs or comment threads to show newest-first.
  • Generating mirror-image or RTL display text for design mockups.
  • Reversing word order as a creative writing constraint (like an Oulipo exercise).
  • Testing how a UI handles right-to-left content without installing an Arabic locale.
  • Decoding simple character-reversed messages left in source code comments or social media bios.
  • Flipping the order of bullet points or list items without retyping them.

Limitations & Disclaimer

This tool performs mechanical reversal and does not produce localized right-to-left text. Character reversal may produce visually mirrored text that some browsers render with bidirectional-algorithm quirks, especially when mixing Latin and RTL scripts. Combined grapheme clusters (such as family emoji 👨‍👩‍👧 composed of multiple code points joined by ZWJ) may be split apart by character reversal. For RTL localization, use proper Unicode Bidi control characters and an RTL-aware layout instead. See our disclaimer for full terms.

Frequently Asked Questions

Does this work with emoji and non-English text?

Yes. The character-reversal mode uses the spread operator to iterate over Unicode code points rather than UTF-16 code units, so emoji like 😀 and accented characters like é, ü, ñ survive intact. Older reversal tools that used <code>split('')</code> would break emoji into broken surrogate halves.

What is the difference between reversing words and reversing lines?

Reversing words flips the order of words within each line (so &ldquo;a b c&rdquo; becomes &ldquo;c b a&rdquo;). Reversing lines flips the order of the lines themselves (so the last line becomes the first) without touching the words inside any line.

Can I reverse only part of my text?

Not directly. The tool reverses the entire input. To reverse a portion, copy that portion into the field, reverse it, then paste it back into your original document at the right place.

Does the tool preserve my original whitespace?

Yes. Word-reversal uses a capturing group in the split regex so the original whitespace (tabs, double spaces, line breaks) is preserved between the reversed words. Character reversal preserves all characters including whitespace exactly.

Will this produce actual Arabic-style right-to-left text?

No. Character reversal produces a mirror-image string that still uses left-to-right character ordering in memory. True RTL rendering requires Unicode bidirectional control characters and an RTL-aware font. This tool is for puzzles and data reordering, not for producing localized RTL content.

Is my text uploaded anywhere?

No. All reversal happens in your browser using JavaScript. Your text never leaves your device, which makes the tool safe for confidential content.

Last updated: July 21, 2026  ·  Author: HT99 Tools Editorial Team  ·  Reviewed by: HT99 Tools Editorial Team