Text Reverse & Repeat
Reverse characters, words, or lines, repeat text, and count occurrences.
Last updated: August 2026
Reversed characters
—
Reversed word order
—
Reversed line order
—
Repeated 3×
Was this tool helpful?
Reversing and repeating text
This set of small operations covers the everyday string chores: reverse the characters, reverse the word order, reverse the line order, repeat a block a fixed number of times, and count how often a substring appears. None of them are hard individually, but doing them by hand is error-prone, especially the counting.
Three kinds of reverse
Reversing characters turns hello into olleh. Reversing words keeps each word intact but flips their order, so the quick fox becomes fox quick the. Reversing lines flips a list top to bottom without touching the text on each line. People often ask for one and get another, so being explicit about the unit matters.
Example
"abc def" reversed by char: "fed cba"
"abc def" reversed by word: "def abc"
repeat "ab" x3 -> "ababab"
count "an" in "banana" -> 2Character reverse and Unicode
Naive character reversal can mangle text with emoji or combining marks. A flag emoji is a pair of code points, and a letter with an accent may be a base letter plus a combining mark. Reverse those blindly and you split a glyph in half. Reversing by grapheme cluster, not by raw code unit, keeps multi-code-point characters whole.
Counting overlaps
Counting aa in aaaa gives 2 if matches cannot overlap and 3 if they can. Most tools count non-overlapping matches by default, which is what you usually want for things like counting delimiters.
FAQ
Why did my emoji break when reversed? It was reversed by code unit, splitting a multi-code-point glyph. Grapheme-aware reversal avoids that.
Does repeat add a separator between copies? By default no, copies are joined directly. Add a newline or space yourself if you need one between repetitions.
Is the occurrence count case-sensitive? Usually yes unless you fold case first, so The and the count separately.