Dev TooloraLocal dev tools

> Text

Text Reverser

Reverse whole visible characters, word blocks or physical lines without silently trimming text or normalizing line endings.

Runs locallyWorks offline
Back to results
Input

Source data

Reverse
Scope
Whole text can move words or character units across line breaks. Each line transforms its body independently and keeps its terminator unchanged.
Character unit
Graphemes keep visible character clusters together. Code points can split combining accents, flags and joined emoji; surrogate pairs remain intact.
Output

Result

Your result will appear here.

Tool guide

About this tool.

  • Text reversal changes the order of selected units. Reversing letters, word blocks and entire lines produces different results.
  • The default uses Unicode grapheme clusters: a letter with its combining marks or a supported emoji sequence stays together. It changes text order, not the direction of the writing system, and it is not encryption or a visual mirror effect.

  • Create reversed headings or simple text puzzles without splitting common emoji sequences.
  • Reverse whitespace-delimited word blocks while preserving the original separator slots.
  • Reverse the order of a list or log’s physical lines.
  • Inspect Unicode code-point ordering deliberately, or reverse characters within each line without moving line breaks.

Paste text or choose a sample, then choose Characters, Words or Lines.

For characters, start with Graphemes to keep accents and emoji sequences together. Use Unicode code points only when you want the underlying code-point order.

Characters and Words offer Whole text or Each line scope. Each line preserves the order and spelling of all CR, LF and CRLF terminators.

Words are non-whitespace blocks, not language-aware dictionary words. Punctuation remains attached to its block. Decide whether separator slots stay in place or reverse with the blocks.

Lines reverses physical line bodies while retaining the original separator-slot terminators. Empty lines participate. No normalization, trimming or extra terminator is applied.

Run, inspect the output, then copy, insert or save reversed-text.txt. Empty and whitespace-only input are valid. The exported file is exactly the result, without a summary footer.

  • Characters: abc β†’ cba.
  • Graphemes: Café πŸ‘©πŸ½β€πŸ’» β†’ πŸ‘©πŸ½β€πŸ’» éfaC; the accent and emoji sequence stay with their base.
  • Words with separator slots kept: " one two three " β†’ " three two one ".
  • Each line: "abc def " β†’ "cba fed ".
  • Lines: "one two three " β†’ "three two one "; terminators stay in their original separator slots.

  • Input is limited to 100,000 UTF-16 units and 10,000 physical lines. NUL and unpaired surrogates are rejected; empty input is valid.
  • Graphemes use the runtime’s Intl.Segmenter. Unicode-data versions can affect newly introduced character sequences. A runtime without segmentation shows an error rather than silently falling back to code points.
  • Unicode code points are not UTF-16 code units. This option never splits a surrogate pair, but it intentionally can split grapheme clusters. Whole-text code-point reversal changes CRLF to LFCR.
  • No Unicode normalization, accent removal, case conversion or whitespace cleaning is performed. Right-to-left display may look different from the logical string order.
  • Word boundaries use JavaScript whitespace (\s), including NBSP and line breaks. Text without whitespace, such as a Chinese phrase, is one block; this is not linguistic word segmentation.
  • In Lines mode, CR, LF and CRLF stay in original separator positions instead of traveling with their old line body. A trailing empty sentinel is not an extra physical line. An initial empty line can become an empty last body, making an existing separator appear at the end.
  • Whole-text grapheme reversal can move a final newline to the beginning. Use Each line to keep line breaks in place. Reversing twice is not a universal round-trip guarantee: grapheme boundaries or terminal empty-line representation can change after concatenation.
  • Untouched samples and VS Code drafts retain raw line endings. Browser textareas normalize user-edited text to LF; those edited values are the actual input.
  • Only controls relevant to the selected mode are shown and validated. Samples reset all four settings. Copy, insert and TXT export preserve the exact output, including whitespace-only or empty results.

FAQ

Questions about Text Reverser

Why do emoji and accented letters stay intact when reversed?

The default unit is the grapheme cluster, so πŸ‡¨πŸ‡ΏπŸ‘πŸ½ β†’ πŸ‘πŸ½πŸ‡¨πŸ‡Ώ. Switch Character unit to Unicode code points to see the raw order instead, πŸ½πŸ‘πŸ‡ΏπŸ‡¨, which breaks the flag and skin tone apart.

How do I reverse the order of lines?

Choose Reverse: Lines. one / two / three β†’ three / two / one, and each line ending stays in its original position.

How do I reverse word order without reversing letters?

Choose Words. A word is any run of non-whitespace, so punctuation moves with it: Hello, world! becomes β€œworld! Hello,” with the comma still attached.

What happens to line breaks when I reverse characters?

With Whole text, line breaks move with the characters, so ab / cd β†’ dc / ba. Each line keeps line endings in place and gives ba / dc. Code-point mode also turns a CRLF into LF followed by CR.

Does reversing work for Arabic or Hebrew text?

It reverses the stored (logical) character order as for any script, so Χ©ΧœΧ•Χ abc β†’ cba ΧΧ•ΧœΧ©. How the result looks depends on your app’s bidirectional display, so it may not look like a simple mirror image.

Continue with

Text StatisticsUnderstand Unicode text length, words, lines, UTF-8 size and estimated reading time.Sort LinesSort physical lines with explicit language rules, natural number groups, stable ties and preserved separator-slot line endings.Text DiffAlign two texts by actual line changes, inspect both versions and export a complete comparison report.Whitespace CleanerClean spacing with explicit controls, preserve indentation and line endings, and inspect invisible changes before exporting.