FormatterHQ

Reverse String

Write text backwards, reverse the order of words or lines, or flip the letters inside each word while keeping the word order.

Loading tool…
Ready.

How to use the Reverse String

  1. Paste or type the text you want to reverse.
  2. All four results appear at once in their own cards: Reversed characters, Reversed word order, Reversed line order and Each word reversed.
  3. Click Copy on the card you need, or ↑ Use to send that result back to the input.

Reverse String Tool: Four Ways to Flip Text

This reverse string tool flips text in four ways and shows all four results side by side. You can mirror every character, reverse the order of words, reverse the order of lines, or reverse the letters inside each word while the words stay where they are.

Example

Here is the sentence “Hello World! Was it a car or a cat I saw?” in three of them:

Reversed characters:     ?was I tac a ro rac a ti saW !dlroW olleH
Reversed word order:     saw? I cat a or car a it Was World! Hello
Each word reversed:      olleH !dlroW saW ti a rac ro a tac I ?was

Reversed line order works on multi-line text: the last line moves to the top and the text of each line is untouched.

What each card shows

  • Reversed characters reverses the whole input, including spaces, punctuation and line breaks.
  • Reversed word order reverses words within each line. Line breaks stay in place and the spacing between words is preserved. Punctuation stays attached to its word, so “World!” moves as one piece.
  • Reversed line order is handy for flipping a log file so the newest entry comes first, or reversing a numbered list.
  • Each word reversed reverses every run of non-space characters, which is how you create simple mirrored puzzle text.

Emoji and accented letters

Reversal works on Unicode code points, not on raw UTF-16 units. An emoji such as 👍 therefore survives intact instead of turning into broken symbols. That is a common bug in the JavaScript one-liner s.split('').reverse().join(''); spreading the string with [...s] avoids it, and Python's s[::-1] also works per code point.

Two cases still need care. Emoji built from several code points, such as flags or skin-tone variants, come out in a different order. And an accent typed as a separate combining mark can end up on the neighboring letter. Precomposed letters like “é” are not affected.

Checking palindromes

A palindrome reads the same in both directions once you ignore case, spaces and punctuation. Reversing “Was it a car or a cat I saw?” shows the letters match. To compare exactly, first strip symbols with Remove Punctuation, then make the text lowercase with the Case Converter, and reverse it.

Reverse vs upside-down text

Reversing only changes the order of characters; every letter still faces the normal way. If you want text that looks rotated 180 degrees, use Upside Down Text, which swaps each letter for a flipped look-alike and also reverses the order.

Privacy

The reversal runs in your browser. Nothing you paste is sent to a server unless you click Save & Share to create a link.

Frequently asked questions

How do I reverse the order of words but keep each word readable?
Use the Reversed word order card. It reverses the sequence of words on each line but leaves the letters inside each word untouched, so “one two three” becomes “three two one”.
Why does reversing text break emoji in some tools?
Many emoji are stored as two UTF-16 units, and reversing unit by unit separates them. This tool reverses whole code points, so single emoji stay intact. Emoji made of several code points, such as flags, can still change.
Can I reverse the lines of a list?
Yes. The Reversed line order card moves the last line to the top and the first line to the bottom without changing the text inside any line. It is useful for reversing logs or chronological lists.
How do I reverse a string in JavaScript or Python?
In JavaScript, [...str].reverse().join('') reverses by code point and keeps simple emoji intact. In Python, str[::-1] does the same. Both give the same result as the Reversed characters card here.

Last updated October 3, 2026

Related tools

JSON Multiline String Converter Convert multi-line text into a valid JSON string with \n escapes, a JSON array of lines, or concatenated string literals. JSON to String Converter Convert JSON to a single escaped string you can paste into code, databases or other JSON documents. Choose double, single or no quotes. String Builder Turn multi-line text into StringBuilder / string concatenation code for Java, C#, JavaScript, Python, PHP or Go. String Byte Size Counter Count how many bytes a string uses in UTF-8, UTF-16 and UTF-32, plus characters, code points and Base64/URL-encoded size. String to JSON Converter Convert an escaped JSON string back into formatted JSON. Handles quoted literals, backslash-escaped text and double-encoded JSON. String Utility Inspect a string: length, UTF-8 byte size, words, lines, plus uppercase, lowercase, reversed and trimmed versions. Sentence Counter Count the sentences in a text and list them one by one, together with word and character counts. Shuffle Lines Randomly shuffle the order of lines in a list — for draws, playlists, quiz questions and test data. URL Slug Generator Convert titles into clean, SEO-friendly URL slugs: lowercase, hyphens, accents transliterated, stop words and length limits. One per line. Small Text Generator Convert text into small caps, superscript or subscript Unicode letters you can copy and paste. Sort Text Lines Sort lines alphabetically, naturally, by length, in reverse or randomly — with optional de-duplication. Text Cleaner Clean messy text: remove invisible characters, straighten smart quotes, collapse spaces and strip HTML.