🧰 UtlKit

Text Reverser: How a 31-Character Line Becomes "?yadot uoy era woH !dlroW olleH" in Character Mode and "today? you are How World! Hello" in Word Mode

Paste "Hello World! How are you today?" and the Text Reverser returns "?yadot uoy era woH !dlroW olleH" in character mode and "today? you are How World! Hello" in word mode, with line mode flipping the order of the lines, all computed in the browser.

Type "Hello World! How are you today?" into the Text Reverser and you get three different answers depending on the mode: character mode returns the 31-character line as "?yadot uoy era woH !dlroW olleH", word mode keeps all six words intact and reorders them into "today? you are How World! Hello", and line mode flips the order of the lines while every line itself stays untouched. All three results are computed in your browser on the page, with no request to a server.

Character mode reverses code points, not bytes

Character mode reads the string from the last code point to the first and writes it back, so the letters inside each word move as well. "Hello World! How are you today?" comes back as "?yadot uoy era woH !dlroW olleH", the question mark now first and the capital H of Hello last. Because the split happens at code points rather than bytes, an emoji survives as one unit: "ab🚀cd" returns "dc🚀ba" with the rocket whole between the two letter pairs. The Character Counter reports that same input as 6 characters, since its count follows the internal 16-bit units where the rocket occupies two, while the visible symbols number five.

Word mode reorders words and normalizes whitespace

Word mode is the one that preserves words. It cuts the input on runs of whitespace, discards the empty pieces, reverses the word list and rejoins with a single space, which is why the six-word line returns "today? you are How World! Hello". That rejoin also cleans the spacing along the way: "hello" followed by three spaces and "world" comes back as "world hello", one space, no leading or trailing room. If a block sits on irregular spacing, the Whitespace Cleaner applies the same collapse-to-one-space rule to a whole document at once, while word mode here only normalizes as it reorders.

Line mode flips the order of the lines

Line mode keeps the content of every line and only changes their order: a block whose lines read "apple", "banana" and "cherry" comes back as "cherry", "banana", "apple", and a block of log lines becomes newest first without touching a single character inside. That comparison use is where String Similarity earns its place: feed it the original block and its line-reversed twin and it scores how close the two reads are, which is the numeric form of the palindrome check, the same trick as reversing one line and asking whether the answer equals the question.

Reversing twice returns the original

Character mode is its own undo. Run "?yadot uoy era woH !dlroW olleH" through the tool again and you get "Hello World! How are you today?" back, the exact 31 characters in the exact order, because reversing a list twice is the identity. Word mode round-trips too, but only up to the normalization the first pass already did: a triple space collapsed to one on the way out stays one on the way back. That pair property, transform and then untransform, is why encoders feel the same: the URL Encoder/Decoder also works in pairs, encode then decode, and the decoded output must equal the input or the pair is broken.

Where reversal sits in a text pipeline

Reversal is the cheapest encoding you can build, a pure permutation that spends no bits, and it slots into the same pipelines as the encoders that do spend them. The text to binary guide covers the sibling direction, mapping every character to its 8-bit code so "Hi" reads 01001000 01101001, and the same round-trip logic applies: decode the code and you must land back on the string that produced it. Reversal is the zero-cost member of that family, the one where the inverse is the operation itself, which is exactly why a scripter reaches for it first when testing whether a pipeline preserves content.

From reversal to analysis

The point of reversing is rarely the reversed text; it is what the comparison reveals. Palindromes, order checks, and the habit of reading a block backwards to spot what the eyes skip are all comparison work, and the word and character counting guide is where the numbers on the other side of that comparison come from, the word count, the character split and the top ten characters of the block as written. Reordering changes none of them, which the Word Frequency Counter makes visible at a glance: the reversed line and the original line both clean down to the same six words, hello, world, how, are, you, today, one occurrence each, because reordering changes no word and no count.

Related Tools

Frequently Asked Questions

What does the Text Reverser do?

It flips your text in three selectable modes. Type "Hello World! How are you today?" and character mode returns "?yadot uoy era woH !dlroW olleH", word mode returns "today? you are How World! Hello", and line mode flips the order of the lines while each line stays intact. Everything is computed in your browser on the page, with no request to a server.

What is the difference between character, word and line mode?

Character mode moves every code point, including the letters inside each word, so "Hello" becomes "olleH". Word mode keeps every word intact and only reorders them, and the single-space rejoin collapses runs of spaces. Line mode changes only the order of the lines; a single line comes back unchanged. The split in character mode happens at code points, not bytes, so an emoji moves as one unit.

Can I reverse a reversed text?

Yes. Character mode is its own undo: run "?yadot uoy era woH !dlroW olleH" through the tool again and you get "Hello World! How are you today?" back, all 31 characters in the exact order. Word mode round-trips too, but only up to the normalization the first pass already did: a triple space collapsed to one on the way out stays one on the way back, so the round trip is exact only when the input already had single spacing.

Does an emoji get cut in half?

No. Character mode splits the input at code points, not bytes, so the rocket in "ab🚀cd" moves whole and the tool returns "dc🚀ba". The Character Counter is the check: it reports the same input as 6 characters because its count follows the internal 16-bit units where the rocket occupies two, while the visible symbols number five. Two different countings of the same five symbols.

Is my text uploaded anywhere?

No. Your input text and the selected mode stay in your browser on the page, with no request to a server. Close the tab and the text is gone; nothing is stored, logged or shared.

Related Articles