Skip to main content
ToolsHub

Reverse Text

Paste any text and reverse it by characters, words, or whole lines. Perfect for puzzles, mirror writing, and creative formatting — all client-side.

Updated

Files never leave your browser

Reversed text will appear here

Type or paste text on the left to see it reversed.

How to use Reverse Text

Reverse any text by characters, words, or lines entirely in your browser — nothing is uploaded to any server. Whether you're creating mirror-image text for a puzzle, flipping a word list, or reversing the order of lines in a log file, this tool handles it instantly. Choose from three reversal modes and optionally reverse each line independently while keeping the line order intact.

  1. Paste or type your text into the input area.
  2. Select a reversal mode: "By characters" (mirrors the full string), "By words" (reverses word order), or "By lines" (reverses line order).
  3. For character mode, toggle "Reverse each line separately" to flip each line independently while preserving line order.
  4. Click "Reverse" — output appears instantly.
  5. Copy or download the reversed text.

Your data never leaves your device — 100% private processing.

Reversal modes explained

Character reversal reads the entire input as a flat sequence and outputs it in reverse order — "Hello World" becomes "dlroW olleH". Word reversal splits the input on whitespace boundaries, reverses the array of tokens, and rejoins with spaces, turning "one two three" into "three two one". Line reversal treats each newline-terminated segment as a unit and reverses the order of those segments, making the last line first — useful for reversing chronological logs or reversing the order of dated entries. All three modes run entirely in the browser with no server round trip.

Reversal mode examples
ModeInputOutput
By charactersHello WorlddlroW olleH
By wordsone two threethree two one
By linesLine1 / Line2 / Line3Line3 / Line2 / Line1
Each line (chars)cat / dogtac / god

Unicode and emoji reversal considerations

Naive character reversal using JavaScript's split("").reverse() breaks Unicode characters above U+FFFF — including most emoji — because they are stored as surrogate pairs in JavaScript's UTF-16 string model. A single emoji occupies two code units, and splitting them apart produces corrupted output. This tool uses the Unicode-aware spread operator ([...str]) or the Intl.Segmenter API where available to treat each grapheme cluster as one unit, correctly preserving emoji, flag sequences, and complex scripts such as Devanagari and Thai through all reversal operations.

Worked examples

Reverse characters

Inputs: 'Hello'

Result: olleH

Reverse word order

Inputs: 'one two three'

Result: three two one

Reverse line order

Inputs: Line1 / Line2 / Line3

Result: Line3 / Line2 / Line1

Glossary

Grapheme cluster
The smallest unit of writing that a user perceives as a single character; it may be composed of multiple Unicode code points, such as a base letter combined with diacritics or a flag emoji sequence.
Surrogate pair
A pair of 16-bit code units used in UTF-16 to represent a single Unicode code point above U+FFFF, such as most emoji and rare CJK characters.
Code unit
The fixed-size storage unit for an encoding; UTF-16 uses 16-bit code units, and JavaScript strings are sequences of UTF-16 code units.
Palindrome
A word, phrase, or sequence that reads the same forwards and backwards (e.g., "racecar"); character reversal is the standard computational test for palindromes.

Related reading

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Related Text Tools

Explore all Text Tools.