Reverse characters, word order, or line order

Reverse Unicode code points, whitespace-delimited token order, and physical line order as three separate results.

freeworks offlinenothing uploaded
ToolText Reverser
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Character mode reverses code-point iteration, word mode reverses alternating text and whitespace tokens, and line mode reverses CRLF/LF rows. Code-point iteration preserves surrogate pairs, while line reconstruction uses LF.

  • All three interpretations appear together because each answers a different reversal task.
  • Unicode grapheme clusters are not preserved even though individual supplementary code points are.

Worked example

Reverse Characters
Reverse all characters in a string
Input
											Hello, World!
										
Output
												Characters: !dlroW ,olleH
Words: World! Hello,
Lines: Hello, World!
											

When to use this

Wordplay puzzles reverse phrases, editors invert pasted lists, and Unicode lessons contrast code points with grapheme clusters.

Edge cases

  • A family emoji joined by U+200D reverses by components and can render as a different or broken sequence.
  • Word mode reverses whitespace tokens too, so leading and trailing spaces exchange sides.
  • A trailing newline becomes an empty final row that moves to the beginning in line mode.

References