Skip to content

Reverse Text

Reverse
Reversed text
—
Characters
—
Words
—

Paste your text and pick how to turn it around. Backwards reads every character from the end, so "Hello, world!" becomes "!dlrow ,olleH". Word order flips words but keeps their spelling, so "the sky is blue" becomes "blue is sky the". Line order puts the last line first.

About this tool

People reverse text for puzzles, mirror-style usernames, palindrome checks, and for testing how code handles strings. Each job needs a different kind of reversal, so this page offers four: the whole text backwards, the order of words on each line, the order of lines, or the letters inside every word while the words stay put. Characters are counted the way a reader sees them, so a flag emoji or an accented é moves as one piece instead of breaking into stray symbols. Arabic and Hebrew text reverses too, but because those scripts already run right to left, a backwards result can look the same as plain left-to-right writing on screen. The output is plain text, not a special font, so it pastes anywhere.

How to use it

  1. Add the text

    Type, paste, or open a .txt file. Line breaks are kept.

  2. Choose the reversal

    Backwards, Word order, Line order, or Each word.

  3. Copy the result

    The reversed text shows in a box with its own Copy button.

Examples

Reverse the words in a sentence

Your text
the sky is blue
Reverse
Word order

Result Reversed text: blue is sky the
Characters: 15
Words: 4

  1. Each line was split at spaces and its words were put back in the opposite order; punctuation stays attached to its word.
  2. Same text, new order: nothing is added or removed except extra spaces between words in word mode.

Word order flips while each word keeps its spelling, the classic string exercise.

Backwards text

Your text
Hello, world!
Reverse
Backwards

Result Reversed text: !dlrow ,olleH
Characters: 13
Words: 2

  1. All 13 characters were read from last to first; an emoji or accented letter moves as one character.
  2. Same text, new order: nothing is added or removed except extra spaces between words in word mode.

Every character, including the comma and exclamation mark, is read from the end to the start.

Flip a list upside down

Your text
first second third
Reverse
Line order

Result Reversed text: third
second
first
Characters: 18
Words: 3

  1. The 3 lines were put back from last to first; text inside each line is unchanged.
  2. Same text, new order: nothing is added or removed except extra spaces between words in word mode.

The last line becomes the first, as the Linux tac command does with a file.

How it is calculated

Backwards: output = characters read from last to first, one grapheme cluster at a time; Word order: words on each line rejoined from last to first

A grapheme cluster is what a reader counts as one character: a letter with its accent, or an emoji built from several code points. Splitting on those clusters, not on raw code units, stops a reversed emoji from turning into broken boxes. Word order splits each line at runs of spaces and joins the words back with single spaces, so punctuation stays glued to its word ("blue." stays "blue."). Line order keeps each line untouched and flips their sequence, like the tac command. Each word reverses every run of non-space characters in place, which keeps spacing exactly as typed.

Use from code or an AI agent Free API · MCP

The same calculation is a free JSON API. No key needed. The answer is in result.stats.primary.

curl -X POST https://api.tools-directory.workers.dev/v1/tools/reverse-text \
  -H 'Content-Type: application/json' \
  -d '{"inputs":{"text":"the sky is blue","reverse_by":"words"}}'

When not to use it

  • For true mirror writing that flips each letter's shape, you need a mirrored font or image, not reordered characters.
  • For sorting a list alphabetically, reversing line order is not the same thing.

Common mistakes

  • Expecting Word order to also reverse punctuation; a full stop stays on the word it was attached to.
  • Reversing Arabic text to fix a display problem, which usually makes it read wrong in a correct right-to-left editor.

Frequently asked questions

How do I make backwards text I can copy and paste?

Choose Backwards, type your text, and press Copy on the result box. The output is ordinary characters in reverse order, so it pastes into chats, bios and documents without any special font or app.

How do I reverse the words in a sentence but keep each word spelled right?

Choose Word order. "the sky is blue" becomes "blue is sky the". Each line is handled on its own, so a paragraph of several lines keeps its line breaks while the words on every line are flipped.

How do you reverse words in a string, like the LeetCode problem?

LeetCode 151 asks you to split on spaces, drop extra spaces, and join the words in reverse order with single spaces. Word order mode follows the same rule, so you can check your expected output for a test case here before running your Java or Python solution.

How do I reverse the lines in a file on Linux?

The tac command prints a file's lines from last to first: tac notes.txt. In Vim, :g/^/m0 does the same in the buffer. Without a terminal, open the .txt file here and choose Line order.

Can I reverse Arabic text?

Yes, the characters are reversed like any other script, and letters with marks move as one piece. Because Arabic is shown right to left, the reversed string may look like left-to-right writing, and joined letter shapes can change at the new word edges.

Is backwards text the same as a mirror font?

No. Backwards text changes the order of normal letters; each letter still faces the usual way. Mirror text that flips the shape of every letter needs special look-alike Unicode symbols or an image, and many letters have no mirrored version.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, November 30). Reverse Text. Tools Directory. Retrieved December 1, 2026, from https://directory.milunir.com/text-tools/text-formatting/reverse-text/

MLA

Tools Directory Editorial Team. “Reverse Text.” Tools Directory, 30 Nov. 2026, https://directory.milunir.com/text-tools/text-formatting/reverse-text/. Accessed 1 Dec. 2026.

Chicago

Tools Directory Editorial Team. “Reverse Text.” Tools Directory. Last modified November 30, 2026. Accessed December 1, 2026. https://directory.milunir.com/text-tools/text-formatting/reverse-text/.

Link<a href="https://directory.milunir.com/text-tools/text-formatting/reverse-text/">Reverse Text – Tools Directory</a>