Reverse Selected Text
Reverse Selected Text changes only a chosen span inside the input, leaving the surrounding text in place.
Example: reverse selected text
hello world
hello dlrow
How to use this tool
- Paste the full text and identify the exact span to change.
- Set Start offset and End offset so they surround the target text.
- 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.