Repeat Text Tool

Duplicate text as many times as you need.

How it is calculated

The tool copies the exact text you enter and joins the copies with line breaks, one copy per line. output = text × n with a newline between each copy and none after the last. The repeat count must be a whole number from 1 to 1,000; a decimal such as 2.5, zero, a negative number or anything above 1,000 gives no result. The text is not trimmed or changed, so spaces, capital letters and punctuation inside it are repeated as they are. The total output length is therefore the text length times the count plus the line breaks.

Worked example

Enter the text Item 1 and a count of 3. The tool writes the text three times, each on its own line:

Item 1 Item 1 Item 1

That is 3 lines of 6 characters each, plus 2 line breaks between them.

Try this example →

Common mistakes

  • Entering a decimal repeat count such as 2.5; only whole numbers are accepted.
  • Expecting the copies on one line; each copy always gets its own line, and a separator typed inside the text does not change that, so replace the line breaks after pasting if you need one line.
  • Leaving a trailing space or newline in the text, which is repeated every time.
  • Asking for more than 1,000 copies; the limit protects the page and gives no output.

About this calculator

This tool repeats a piece of text a set number of times, from 1 to 1,000, and puts each copy on its own line, so you do not have to copy and paste the same string over and over by hand.

Developers and testers use it to generate repetitive placeholder or stress-test data, for instance to see where a field's length limit cuts in; others use it to build a list of identical lines to edit, or a long filler text. If you need the copies on one line, replace the line breaks after pasting.

Was this helpful?

You can pick up to 3 reactions.

Note from the editors

One practical use is testing a form or database field: 'abc' repeated 100 times gives 300 characters plus 99 line breaks, handy for finding where a length limit cuts in. The copies are joined by line breaks only, so if you need them on one line, replace those breaks after pasting. A count of 1 simply returns your text once. What do you plan to use the repeated text for?

Comments

  • Be the first to comment.

Popular calculators

All Calculators