Reverse Text
TX-13Paste text and reverse its characters, the order of its words, or the order of its lines. Accented letters and emoji are kept together when your browser supports it.
Runs in your browser. Nothing is uploaded.
Text
Reversed text
How to use it
- Paste your text into the input box.
- Press Reverse characters to flip the whole text, or Reverse words, or Reverse line order.
- Tick Reverse characters within each line to keep the line order and flip each line on its own.
- Copy the result or download it as a .txt file.
Characters, words and lines
Reverse characters flips the whole text from the last character to the first, so the last line comes out first and each line is read backwards. Tick the option to flip every line on its own and keep the lines where they are. Reverse words reverses the order of the words on each line while the spaces between them stay in place. Reverse line order moves the last line to the top and leaves each line untouched. Each button works on your text from scratch.
Emoji and accents
Reversing a string one code unit at a time breaks emoji and letters with accents: a flag, a skin-tone emoji or an e with a combining accent comes apart. This tool reverses by grapheme cluster, the unit a reader sees as one character, using the Intl.Segmenter built into your browser. If an older browser lacks it, the tool falls back to Unicode code points, and decomposed accents can then move to the wrong letter.
Limits
A word here is a run of non-space characters, so punctuation stays attached to its word. Reversing the characters of right-to-left text such as Arabic or Hebrew reverses the stored order of the characters, which is not the same as how the text is drawn on screen. Line endings (CRLF or LF) are kept as they were. The tool does not mirror letters or produce upside-down text.
Questions people ask
How do I reverse a string online?
Paste the text and press Reverse characters. The last character becomes the first. If the text has several lines, the lines come out in reverse order too; tick Reverse characters within each line if you only want each line flipped.
How do I reverse the order of words in a sentence?
Press Reverse words. The words on each line come out in the opposite order, so one two three becomes three two one. Punctuation stays attached to its word and spaces between words are kept.
How do I reverse the order of lines?
Press Reverse line order. The last line becomes the first, and each line keeps its own text. It is a quick way to flip a log file or a list that was written oldest first.
Does reversing break emoji or accented letters?
Not in current browsers. The tool reverses by grapheme cluster using Intl.Segmenter, so a flag, a family emoji or a letter with an accent moves as one piece. Only in a very old browser without that feature does it fall back to code points, where some combined characters can split.
Will it reverse Arabic or Hebrew text correctly?
It reverses the stored order of the characters, which is what the button promises, but right-to-left scripts are displayed in the opposite direction by the browser, so the visual result can look unchanged or surprising. Check the output in the place where you will use it.
Can I reverse each line separately?
Yes. Tick Reverse characters within each line, then press Reverse characters. Every line is flipped on its own and the lines stay in their original order.
About this tool
Reverse characters flips the whole text, so the last line comes out first. It works on what a reader sees as one character (a grapheme cluster), using your browser's Intl.Segmenter when it exists, so a letter with its accent, a flag, or an emoji with a skin tone stays in one piece. In an older browser without it, the tool reverses by Unicode code point and accents on decomposed letters can end up on the wrong letter. Tick the option to reverse each line on its own instead. Reverse words reverses the order of the words on each line; a word is any run of non-space characters, so punctuation stays attached (world! stays world!) and the spaces between words keep their positions. Reverse line order flips the lines and leaves each line as it is. Line endings are kept. Right-to-left scripts are reversed in stored order, which is not the same as how they look on screen.