ToolsHub4u

Reverse characters, words or lines

Type a line and read it backwards. Four modes cover whole lines, word order, line order and the letters inside each word, with palindrome detection and a switch that keeps end punctuation where it belongs.

  • Four reversal modes
  • Keeps emoji intact
  • Line order optional
Ready Text & Writing
Characters are not bytesAn emoji or an accented letter can use several code units. Reversing those units breaks the character, so this tool reverses whole graphemes instead.
1Enter
2Adjust
3Copy result

Text Reverser

1

Text and direction

Line order is kept in character and word modes.

Reverse
No text yet Live
2

Reversed text

Characters reversed

Characters reversed

Characters
50
Words
11
Lines
2

Line order is unchanged. Each line is reversed on its own, so a poem keeps its stanza shape.

Reversed text is no longer readable by search, spell check or a screen reader. Keep the original if it matters.

Four ways to run text backwards, and the mode matters more than the button. Characters reverses every letter in a line; Words keeps the letters and reverses their order; Lines turns the page upside down; Within words leaves the sentence alone and scrambles each word internally.

The default is characters. Type Hello, world! and you get dlrow ,olleH! — the exclamation mark stays at the end because keep end punctuation is on. Turn that off and it becomes !dlrow ,olleH.

The four modes, side by side

Each reversal mode applied to the same input
ModeInputOutput
CharactersHello, world!dlrow ,olleH!
Wordsone two threethree two one
Linesfirst / second / thirdthird / second / first
Within wordsHello, world!olleH, dlrow!

Two details in that table are easy to miss. Characters and Words work line by line: the order of lines never changes, so a four-line poem keeps its shape and only the text inside each line is reversed. Lines mode is the opposite — it reverses the order of the lines and leaves the text of each line untouched, blank lines included.

Within words reverses the letters inside each word but keeps leading and trailing punctuation attached, so Hello, world! becomes olleH, dlrow! rather than !dlrow ,olleH. Contractions are treated as one word: don't stop becomes t'nod pots.

Keep end punctuation in place

This option only affects characters mode, and only at the end of a line. With it on, a full stop, comma, question mark, exclamation mark, colon or semicolon at the end of the line — plus any closing quote or bracket after it — is left where it is while everything before it is reversed.

So Hello. becomes olleH., not .olleH. Mid-line punctuation moves with the text, which is why the comma in Hello, world! ends up attached to the reversed first word. Leading punctuation is not protected, and neither are symbols such as dashes or ellipses: protection covers that specific trailing set.

Palindrome detection

When the result reads the same as the input, the status line says so. The check lowercases the text, removes everything that is not a letter or digit, and compares the remainder with its reverse. Punctuation, spaces and capitals therefore do not break a palindrome, which is why A man, a plan, a canal, Panama is flagged.

Two limits on that check. It only runs in characters mode, so a palindrome typed in lines mode is not announced. And the cleanup keeps a–z and 0–9 only, so accented letters are dropped before the comparison: café éfac collapses to caféfac and the test is meaningless. Short strings of three characters or fewer are never flagged.

Emoji, accents and combining marks

Reversal works on grapheme clusters, not on raw bytes. An emoji made of several code points — a flag, a skin-tone modifier, a family emoji — is treated as one visible character and stays intact when the string is flipped. The same goes for an accented letter written as a base letter plus a combining accent: the two parts are not separated.

That is the difference between this tool and a quick script using split(''), which would tear emoji apart and leave broken glyphs. What it does not do is reorder characters for scripts written right to left; those are reversed in storage order, and the browser still lays the line out right to left, so the display can look odd.

Worked example: a line of dialogue

Worked exampleInput: "Where are you going?" she asked.
Characters, keep ends on: deksa ehs "?gniog uoy era erehW".
Words: asked. she going?" you are "Where
Within words: "erehW era uoy gniog?" ehs deksa.

Read the first line carefully: the final full stop stayed, everything else flipped, and the quotation marks moved to the opposite ends. With straight quotes that looks like nothing happened; with curly quotes, the opening mark becomes a closing one and the result looks wrong. Add the quotes back by hand if the output is going anywhere public.

The words row keeps line order and the punctuation attached to each word, which is why the sentence now opens with "asked." and the question mark sits in the middle. Word mode does not try to rebuild grammar.

What it is not for

  • It is not a font. The output is ordinary characters in reverse order. Fancy text that looks like script or gothic lettering is a different tool, using Unicode lookalike characters.
  • It does not evade detection. Reversed text is not readable by a search engine, a spell checker or a screen reader, and that is a defect in the output, not a feature. Do not use it to hide text from moderation or plagiarism checks; it usually fails and leaves a page that cannot be read aloud.
  • No undo, no history. Applying the result replaces your input. If you may want the original, copy it out first.
  • Single text box only. There is no batch mode, no file upload and no line-by-line table.
  • Text stays in the tab. Nothing is uploaded, and a reload clears everything.

The honest use cases are narrow: a puzzle clue, a mirror-writing effect in a graphic, a test string for a validator, or checking whether a word is a palindrome. For anything a reader has to read, leave the text the right way round.

Questions

Common questions

Short answers to what people ask before using this tool.

How do I reverse text?

Paste your text, pick one of the four modes, and read the result below. Characters is the default; Words, Lines and Within words change what gets flipped. Copy the output when it looks right.

What is the difference between Characters and Within words?

Characters reverses the whole line, so word order reverses too. Within words leaves the words where they are and reverses only the letters inside each one, keeping leading and trailing punctuation attached: Hello, world! becomes olleH, dlrow!.

Why does the comma stay next to the first word?

Because only punctuation at the end of the line is protected. A comma in the middle of a line is part of the string being reversed, so it travels with whatever character was beside it and ends up on the other side of the word.

Does it detect palindromes?

Yes, in characters mode. It lowercases the text, strips everything except letters and digits, and compares the result with its reverse. "A man, a plan, a canal, Panama" is flagged; capitals, spaces and punctuation do not matter, and strings of three characters or fewer are ignored.

Will emoji and accented letters survive?

Yes. Reversal works on whole visible characters, so a flag or a family emoji is not split into pieces and an accented letter stays one letter. That is not true of simple scripts that reverse the raw string, which break these glyphs.

Does it keep line breaks?

Yes in every mode. Characters and Words reverse each line separately and keep the line order, blank lines included. Lines mode reverses the order of the lines and leaves the text inside each line alone.

Can I reverse text back to normal?

Paste the reversed text into the box and run characters mode again with end punctuation off. It returns to the original spelling, but not always to the original spacing: words mode joins with single spaces, so double spaces are lost on the way out.

Is my text sent anywhere?

No. Reversal happens in the browser tab and nothing is uploaded or stored. Reloading the page clears the box, so copy the output before you close it.