consolelog.tools

String Reverser

Reverse text by character, word, line, or sentence — Unicode-safe (emoji & accents survive) with a built-in palindrome check

About this ToolHow it works, benefits & use cases

The String Reverser flips text in six different ways, not just one. Choose to reverse the entire string character by character, reverse the characters inside each word while keeping word order, reverse the order of words, reverse characters within each line, reverse the order of lines, or reverse the order of sentences. The result updates live as you type or change the mode. Crucially, it is Unicode-safe: by default the character-level modes reverse by grapheme cluster, so emoji, regional-flag pairs, ZWJ family emoji, and combining accents stay intact instead of breaking into mojibake — and you can switch this off to compare with naive code-unit reversal. The input panel shows both character and grapheme counts, and a palindrome detector tells you whether your text reads the same forwards and backwards (ignoring case and punctuation). Swap the output back into the input, copy either field, and share the exact state via URL. It runs entirely in your browser.

How to Use

  1. 1Choose a "Mode": entire string, each word, word order, each line, line order, or sentence order.
  2. 2For character-level modes, leave "Unicode-safe (graphemes)" on to keep emoji and accents intact, or turn it off for raw code-unit reversal.
  3. 3Type or paste your text — the reversed output appears live below (use "Load example" to try emoji and a palindrome).
  4. 4Check the palindrome banner, which tells you whether the text reads the same forwards and backwards.
  5. 5Copy the result, use "Swap (output → input)" to feed it back, or copy the page URL to share the exact setup.

Key Benefits

  • Six reversal modes: whole string, each word, word order, each line, line order, sentence order
  • Unicode-safe by default — emoji, flags, ZWJ families, and accents survive character reversal
  • Optional naive code-unit reversal for comparison or legacy behavior
  • Live output that updates as you type or change settings
  • Built-in palindrome check that ignores case and punctuation
  • Character and grapheme counts shown for the input
  • Swap output back to input, copy fields, and share state via URL

Common Use Cases

  • Reversing a string for a coding exercise, puzzle, or interview prep
  • Checking whether a phrase is a palindrome regardless of case and punctuation
  • Reordering lines or sentences without manually cutting and pasting
  • Demonstrating how naive reversal mangles emoji versus grapheme-safe reversal
  • Creating mirrored or reversed text for a creative or typographic effect

Reverse mode

Reverses every character

Keeps emoji, flags & accents intact

0 chars · 0 graphemes

Reverses every character

Enter text above to see the reversed result.

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools