Reverse & Mirror

Reverse Selected Text

Reverse Selected Text changes only a chosen span inside the input, leaving the surrounding text in place.

Try reverse selected text

Paste or type text below. The result updates in your browser.

Example: reverse selected text

Input
hello world
Illustrative result
hello dlrow

How to use this tool

  1. Paste the full text and identify the exact span to change.
  2. Set Start offset and End offset so they surround the target text.
  3. Run the tool and verify both untouched sides and the reversed center.

How the result is made

The start and end controls are JavaScript string offsets. The tool takes the substring between those offsets, reverses its graphemes, and joins it back to the untouched prefix and suffix. With the offsets set around “world” in “hello world”, the result is “hello dlrow”. The end offset is exclusive.

When to use it

This is useful when a document contains one code, word, or phrase to reverse but the rest must remain readable. It avoids a manual cut-and-paste round trip. The homepage reverser applies to each entire line; Reverse Each Word handles every token, not a single selected range.

Details to check

Offsets count UTF-16 units, while the selected span is reversed by grapheme. A start or end inside an emoji or combining sequence can still split it before reversal. The numeric controls are clamped to the input length. Use simple text or inspect the boundaries carefully for Unicode-heavy passages.

Questions people ask

Is the end offset included?

No. The range ends just before that offset.

Does it change all matching words?

No. It changes one range by position.

Why is an emoji at a boundary damaged?

Offsets are UTF-16 positions and can cut through a multi-unit character.