Skip to content
AgileLogics

Text Repeater

Repeats your text a chosen number of times, joined by a newline, space, or nothing.

How it works

Enter text, choose a count and separator, then click Generate.

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

  1. Type or paste the text into the input box.
  2. Set Repeat count (1 to 1,000).
  3. Choose a Separator: New line, Space or None.
  4. 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 line followed by a line break, two copies come out as line, 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 2 and 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

Frequently asked questions

What is the maximum number of repeats?
1,000. The slider runs from 1 to 1,000 and the default is 2. For more copies, repeat the output itself; repeating 1,000 copies 10 times gives 10,000.
Is there a separator after the last copy?
No. The separator only goes between copies, so ha repeated 3 times with Space gives ha ha ha with no trailing space.
Why do I get blank lines between my copies?
Your text probably ends with a line break, and the New line separator adds another one. Remove the trailing line break from the input, or switch the separator to None.
Does it repeat line breaks inside my text?
Yes. The text is copied exactly as typed, so a three-line paragraph repeats as a three-line block each time.
Is my text sent anywhere?
No. Repeating happens in your browser with no server involved.