Format Code Now
/
TextText Repeater Next: Sort Words ›

Text Repeater

TX-21

Type -- times: and a number on the first line, put the text to repeat below it, and get that many copies back, from 1 up to 10,000.

Runs in your browser. Nothing is uploaded.

First line: -- times: N. Then the text to repeat

Repeated text

How to use it

  1. On the first line type -- times: and a number, for example -- times: 5
  2. Type or paste the text to repeat on the lines below it.
  3. Choose the separator between copies: new line, space, none or comma.
  4. Copy the result or download it as a .txt file.

How the directive works

The first line, -- times: followed by a whole number from 1 to 10,000, tells the tool how many copies to make. It is not part of the output. Everything after it is the block to repeat, and it can span several lines. One final line break is dropped so you do not get a blank line at the end of every copy. Decimals, negative numbers and words after -- times: are rejected.

Separators and the size limit

The separator goes between copies, never after the last one. New line puts each copy on its own line, space joins them on one line, none joins them with nothing between, and comma uses a plain comma with no space. To keep the page responsive, a result longer than 5,000,000 characters is refused with an error. Use a smaller count or a shorter block when that happens.

Error messages and what to do

MessageWhat it meansFix
Start the first line with -- times: followed by a number from 1 to 10000, for example -- times: 5The first line is missing the -- times: directive.Add a first line such as -- times: 5 above the text to repeat.
The repeat count is 10001. The limit is 10000.The count is above the allowed maximum.Use a number from 1 to 10000.
Add the text to repeat on the lines after the first line.The directive is present but there is nothing after it.Type or paste the text below the -- times: line.

Questions people ask

How do I repeat text multiple times?

Type -- times: and the number on the first line, then write the text on the next line. Press Repeat and choose a separator. For example -- times: 3 above the word Hello gives three lines of Hello.

What is the most times I can repeat text?

The limit is 10,000 copies. A larger number gives an error that shows your number and the limit. The total output must also stay under 5,000,000 characters, or the tool refuses to build it.

Can I repeat several lines at once?

Yes. Everything after the -- times: line is repeated as one block, line breaks included. With the new line separator, each copy of the block is followed by the next one on a new line.

Does it add a separator after the last copy?

No. The separator is placed only between copies, so a list made with the comma separator does not end with a trailing comma or an extra empty line.

Can I repeat text with a comma between copies?

Yes. Choose Comma in the Separator list. It writes a plain comma between copies with no space after it. If you want a comma and a space, repeat the word followed by a comma and a space with the separator set to None.

About this tool

The first line is a directive, -- times: followed by a whole number from 1 to 10,000, and it is not repeated. Everything after it, including several lines, is the block that is repeated; one final line break is dropped. The separator goes between copies only, not after the last one. Comma means a plain comma with no space. A result longer than 5,000,000 characters is refused so the page stays responsive. Text is repeated exactly as typed, with no numbering or trimming.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.