Reverse Text

Reverse string.

Loading tool…

Reversing text is harder than it sounds

Reversing a string looks like a one-line operation, and for plain ASCII it is. Unicode complicates it considerably. Many characters are stored as multiple code units, so a naive reversal can split them and produce broken output. Emoji built from several code points joined together — a family emoji, or one with a skin-tone modifier — fall apart entirely unless the reversal works on grapheme clusters, the units a reader perceives as single characters.

Then there is direction. Arabic and Hebrew are written right to left, and reversing them does not do what an English speaker's intuition suggests, because the text was never stored in visual order to begin with. Reversing by word rather than by character avoids all of this and is usually what people actually want when they ask to reverse a sentence.

Why we built this tool

The honest uses are small: puzzles and word games, checking whether a phrase is a palindrome, generating a novelty string, testing how software handles unusual input, or reversing the order of a list of lines.

That last one — testing how a system copes with reversed or awkward text — is a real QA task, and it is often run against strings drawn from production data. Whatever the reason, there is no argument for sending text to a server to have its characters put in the other order. Ours does it in your browser instantly, with no request, no storage, and no length limit, and it keeps working offline like everything else here.

Tips and common mistakes

  • Reversing by word is usually what people mean when they say reverse a sentence.
  • Emoji and combining characters can break under a naive character reversal.
  • Right-to-left scripts do not behave the way an English speaker's intuition expects.
  • Palindrome checks should ignore spaces, punctuation, and case.

Open Reverse Text with a link

Reverse Text can be handed its input by the link that opens it, so the page arrives with the work already done. This is meant for assistants and scripts: if a chatbot, an editor extension, or a command-line agent already holds your content, it can build a link instead of asking you to copy and paste into a box.

The payload rides in the fragment — the part of a URL after the #. Browsers never send the fragment to a server, so anything handed over this way stays on your device exactly as a dropped file would. A link that uses the query string instead is rewritten into the fragment by the page before any analytics or ad script can read the address.

Prefix any field with gz#gztext= — to pass it as gzip-compressed base64url, which fits roughly five to ten times more into the same link. Links stay reliable up to about 8,000 characters; past that, chat apps and address bars start truncating them, and the page says so rather than loading half a document.

One exception to the privacy rule: ?url= tells the page to download the input from an address. That request goes from your browser straight to that server — not through ours — but it does leave your device, and it only works if the server allows cross-origin requests.

  • #text= — the text to work on

Example: https://mygadgets.ink/tools/reverse-text/#text=...

Quick start: using Reverse Text

  1. Paste your text into the input above.
  2. Choose whether to reverse characters, words, or lines.
  3. Run the reversal and read the output.
  4. Check any emoji or non-Latin script for corruption.
  5. Copy the result.

For reordering a list properly, Sort Lines is the right tool; Convert Case handles capitalisation changes.

Related Text Tools

Browse all Text Tools →