What does a text repeater do?
A text repeater copies a piece of text a set number of times and joins the copies into one result. This one repeats anything you type, from a single character to several paragraphs, 1 to 1,000 times, with a new line, a single space or nothing between copies. The text is copied exactly, including its own spacing and line breaks.
People use it for three things mostly: building test strings of a known length, filling a layout to see how it copes with lots of content, and making repeated patterns like dividers or emphasis in a message.
Repeating your text
- Type or paste the text into the input box.
- Set Repeat count (1 to 1,000).
- Choose a Separator: New line, Space or None.
- Click Generate and copy the result.
How each separator joins the copies
With ha as the input and a count of 3:
| Separator | Output |
|---|---|
| New line | ha, ha and ha on three separate lines |
| Space | ha ha ha |
| None | hahaha |
The separator never appears at the start or end of the output, only between copies.
Two surprises, and why they happen
Because your input is copied verbatim, any whitespace at its edges doubles up with the separator.
- Blank lines with New line. If your input is
linefollowed by a line break, two copies come out asline, an empty line,line, and a final line break. The trailing newline from your text plus the newline separator makes two breaks in a row. - Double spaces with Space. An input ending in a space, joined by a space, puts two spaces between words.
Both are easy to fix: remove the whitespace at the end of the input, or pick a separator of None and let your own line break or space do the joining.
Working out the output length
The length of the result is predictable:
length = count × (input length) + (count − 1) × (separator length)
New line and Space add one character per gap, None adds nothing. A 100-character sentence repeated 1,000 times with New line gives 100,000 + 999 = 100,999 characters.
That predictability is the useful part when testing limits. Say a database column is VARCHAR(255) and you want to confirm what happens to a 260-character value. Repeat 0123456789 26 times with None and you get exactly 260 characters, and the repeating digits make it easy to see where a cut happened: if the stored value ends in ...01234, it was truncated at 255. In MySQL, how an overlong value is handled depends on the SQL mode, either an error in strict mode or a silent truncation with a warning, as the MySQL documentation on CHAR and VARCHAR explains, which is exactly the kind of behaviour worth testing.
You can confirm any count with the word counter, which reports characters as well as words.
What it won't do
- No numbering. Each copy is identical. If you need
item 1,item 2and so on, repeat a template and number it afterwards, or generate the list in a spreadsheet. - No variation. For filler text that doesn't look like a broken record, use the lorem ipsum generator instead.
- No more than 1,000 copies per run. Feed the output back in as input if you need more; 1,000 copies repeated 1,000 times is a million, though very large outputs can make the browser tab slow.
Tidying the result
Once you have the repeated text, the find and replace tool can swap the separators for something else, such as commas, and the case converter can switch the whole block to upper or lower case in one go.
Last updated