Unicode & Text Authority
TEXT REFERENCE / TOOLS

Reverse text and line order

Reverse text by Unicode grapheme clusters, reverse characters within each line, or reverse line order.

How it works

Choose character reversal to reverse the sequence of browser-segmented grapheme clusters, including combining marks and common joined emoji. Choose line order to reverse LF-separated lines without changing their contents. CRLF and CR become LF. Line order keeps a final newline as a terminator; whole-text character reversal moves line breaks like other clusters. Characters within each line reverses each LF-separated line independently, retaining line order, blank lines and trailing line breaks. No normalization or mirroring is applied.

Copy reversal summary

Use Copy text reversal summary to copy the displayed output code-point count as tab-separated Metric and Value columns, without copying the reversed text. For example, A👩‍💻B becomes B👩‍💻A (5 output code points, not 3 grapheme clusters).

Examples and compatibility

Reversing abc produces cba. A decomposed e with an acute accent remains together when reversed; a joined emoji such as 👩‍💻 is treated as one cluster by modern browsers. Reverse line order changes First / Second on separate lines to Second then First, without reversing the letters. Only CRLF, CR and LF are treated as line separators.

Choose Characters within each line for two lines such as éA and 👩‍💻B. They become Aé and B👩‍💻 in the same order. Empty lines and a final line break stay in place.

Both character reversal modes require Intl.Segmenter. If it is unavailable, use line order instead; the tool does not silently split graphemes into code points. Segmentation follows the browser’s Unicode version and is an approximation of perceived characters (see Unicode text segmentation, UAX #29). Reordering clusters can change their boundaries when adjacent sequences meet; reversing twice is not guaranteed to restore every input. This is logical order reversal, not visual mirroring or bidirectional layout. Input and output are limited to 50,000 UTF-16 units.

Related: Unicode inspector · Alphabetical line sorter · Add line numbers.

Other tools

Text utilities

Encoding and conversion

Typography

Character and case tools