Skip to content
epitometool

Reverse text

Text utilities

Reverse a string by character, word or line.

Updated

Reverse what?

Input

Reversed

  • ⌘EnterCopy output
  • ⌘KClear input

Quick start

How to reverse text

Pick a granularity, paste your text, copy the reversed output.

  1. Step 1
    Pick a mode

    Characters for letter-by-letter reversal (emoji-safe), Words to flip word order, Lines or Sentences to reorder blocks.

  2. Step 2
    Paste your text

    Drop the input into the left pane. Multi-line and Unicode-rich text are both supported.

  3. Step 3
    Copy the result

    Hit Copy or press ⌘/Ctrl+Enter. Punctuation, whitespace runs and line endings are preserved.

In-depth guide

Reverse text by character, word, line or sentence

Reverse any text β€” at character, word, line or sentence granularity β€” without breaking emoji, combining marks, or your line endings. Useful for crosswords and word puzzles, generating mirror strings for tests, flipping list order, or just curiosity.

The four modes

  • Characters β€” reverses the order of grapheme clusters. hello β†’ olleh; cafΓ© β†’ Γ©fac; πŸ‘¨β€πŸ‘©β€πŸ‘§ hi β†’ ih πŸ‘¨β€πŸ‘©β€πŸ‘§ (emoji intact).
  • Words β€” keeps each word intact but flips the order. The quick brown fox β†’ fox brown quick The. Whitespace runs are preserved.
  • Lines β€” flips line order, preserves the original line-ending style (LF or CRLF).
  • Sentences β€” splits on ., !, ? and reverses sentence order, leaving the terminators attached to the right sentence.

Why naive reversal breaks emoji

If your browser doesn't support Intl.Segmenter (very old mobile browsers), we fall back to code-point reversal β€” better than UTF-16 but still imperfect for joined emoji.

JavaScript strings are UTF-16 code units. A family emoji like πŸ‘¨β€πŸ‘©β€πŸ‘§ is actually 11 code units glued together with zero-width joiners. The classic str.split('').reverse().join('') trick splits between every code unit and produces gibberish β€” combining marks attach to the wrong base character, surrogate pairs become unmatched halves.

This tool uses Intl.Segmenter with granularity: 'grapheme', which implements Unicode Standard Annex #29. The result is what users perceive as "characters" β€” and reversing those, instead of code units, gives correct output for every script.

Common use cases

  • Crosswords & puzzles β€” hide a clue answer in plain sight.
  • Palindrome checking β€” reverse and compare.
  • Test fixtures β€” generate predictable transformed strings for unit tests.
  • List ordering β€” flip a long bulleted list end-to-end without manual editing.
  • Right-to-left previews β€” preview how a string might look in RTL contexts (use a proper RTL renderer for real preview).

Frequently asked questions

Does this tool send my text anywhere?

No. Reversal runs entirely in your browser using standard JavaScript and the Intl.Segmenter API. DevTools β†’ Network shows zero requests during use.

Why do my emoji stay intact when reversed?

Character mode segments the input into grapheme clusters using Intl.Segmenter, so multi-codepoint emoji like πŸ‘¨β€πŸ‘©β€πŸ‘§ stay as one unit. Naive reversal with `.split('').reverse()` would tear them apart into invalid sequences.

Does word reversal preserve my punctuation and spacing?

Yes. We split on whitespace runs, reverse only the word chunks, and reassemble β€” so double spaces, tabs and trailing punctuation end up exactly where they were, just attached to different words.

How does line reversal handle CRLF vs LF line endings?

We detect which line ending dominates and use the same one when rejoining. Files copied from Windows stay CRLF; Unix files stay LF β€” no silent line-ending changes.

What's the difference between sentence and line reversal?

Line reversal flips literal newline-separated lines; sentence reversal splits on `.`, `!` and `?` regardless of line breaks. Pick line for poetry / lists, sentence for prose.

Can I use this for mirrored Unicode display?

Yes, but reversing characters and using a mirroring font are different things. This tool reverses logical order; for visually-mirrored text you'll still need a right-to-left script or a glyph-flipping font.

Keep exploring

More tools you'll like

Hand-picked utilities that pair well with the one you're on β€” all free, client-side, and zero-signup.