What is a string reverser?
A string reverser reads a string from its last visible character to its first. It changes Hello to olleH, abc123 to 321cba, and Hello, world! to !dlrow ,olleH.
This tool reverses characters rather than word order. It does not replace letters with mirrored or upside-down Unicode symbols.
How to reverse a string online
- Type or paste text, or select Example.
- Read the reversed result as it updates instantly.
- Copy the result, or select Swap to use it as the new input.
Open Options to reverse each line separately or change how surrounding whitespace is handled. Preserve input exactly is enabled by default, so spaces, empty lines, Tabs, line breaks, punctuation, and capitalization remain part of the transformation.
Reverse string examples
| Input | Output |
|---|---|
Hello | olleH |
abc123 | 321cba |
Hello, world! | !dlrow ,olleH |
A👨👩👧👦é | é👨👩👧👦A |
The family Emoji and the accented é stay intact because the tool reverses user-perceived characters instead of splitting JavaScript UTF-16 code units.
Entire string vs each line
The default mode treats all input as one string. Newlines participate in the reversal, so line order also changes.
Input:
HelloWorldDefault output:
dlroWolleHTurn on Reverse each line separately to preserve line order and reverse only the characters inside each line:
olleHdlroWLine breaks and empty lines are preserved in both modes. When Preserve input exactly is turned off, only whitespace around the entire input is removed before reversal.
Reverse string vs reverse words
These transformations have different meanings:
| Transformation | Hello World becomes |
|---|---|
| Reverse string | dlroW olleH |
| Reverse word order | World Hello |
| Reverse letters in each word | olleH dlroW |
| Mirror text | Different glyphs or visual direction |
This page only reverses a complete string or each line. It does not guess language-specific word boundaries or substitute decorative characters.
Unicode and Emoji support
Some visible characters contain multiple Unicode code points. Combining marks, skin-tone modifiers, flags, and zero-width joiners can all form one grapheme cluster.
The tool uses the browser’s Unicode grapheme segmentation so those sequences move as a unit. Use the String Length Calculator when you also need to compare visible characters, code points, UTF-16 units, and UTF-8 bytes.
Common uses
- Create test values for string-processing code.
- Check how punctuation, spaces, line breaks, and Unicode text behave.
- Restore text that was reversed with the same rules.
- Hide a short puzzle answer from casual reading.
- Compare a value with its reverse while checking a palindrome.
Reversing a string is easy to undo and is not encryption.
How string reversal works
The browser separates the input into user-perceived characters, reads those segments from the end to the beginning, and joins them without otherwise rewriting the content. In per-line mode, it applies the same operation to each line while keeping the original line separators in place.
Reverse string FAQ
Does this tool reverse characters or words?
It reverses user-perceived characters. It does not reorder words as language units.
What happens to multiple lines?
By default, the whole input is reversed, including line order. Turn on Reverse each line separately to keep line order unchanged.
Are spaces and empty lines preserved?
Yes. Preserve input exactly is on by default. Turn it off only when you want to remove whitespace around the complete input before reversal.
Does it work with Emoji and combining marks?
Yes. Modern browsers segment complete grapheme clusters so joined Emoji and combining marks are not split apart.
Does reversing a string twice restore the input?
Yes when Preserve input exactly is enabled. Select Swap twice to return to the original string.
Is reversed text encrypted?
No. Anyone can reverse it again, so it should not protect passwords, secrets, or private information.