Overview
Repeats a piece of text up to a thousand times with your choice of separator — newline, space, comma or nothing — and reports the exact size of what it produced. Built for generating bulk test data: fake message lists, placeholder paragraphs, pagination and scroll-testing payloads.
How It Works
Type the text to repeat, drag the repetitions slider (1 to 1,000) and pick a separator. The output box fills live and a counter below it reports the output length in characters, so you can confirm the size of the payload before copying it. Copy and Clear sit under the output; nothing is written to a server and nothing leaves the page.
Step-by-Step Usage Guide
- Type the exact text to repeat, including any trailing space you want between copies.
- Set the repetition count with the slider; the output length updates as you drag.
- Choose the separator: new line, space, comma, or none.
- Copy the output into your test fixture, mock payload or placeholder document.
Technical Specifications & Standards
The implementation is a one-liner worth reading: Array(times).fill(text).join(separator). The join matters. Building the same string with repeated += concatenation forces the engine to allocate a fresh string at every step, which degrades quadratically as the result grows; joining an array of references allocates the final buffer once and copies each piece in. For the thousand-copy ceiling with a typical phrase the difference is milliseconds against noticeable jank, and it is why the output stays live while you drag the slider. Repetitions are clamped: a fractional or pasted number is floored, values below one become one, and anything above the slider's thousand is capped there — the cap exists because a careless 10^9 would freeze the tab, not because the engine has a hard limit. The separator choices map to real formats: newline for line-based fixtures and message lists, comma for quick CSV-ish rows, space for prose-length filler, none for compact identifier strings. One subtlety in the output counter: the reported length counts UTF-16 code units, which is what JavaScript's .length returns, so an emoji in the repeated text counts as two characters each even though it displays as one. If your downstream system counts differently — most text processors count code points — the numbers will disagree by exactly the number of astral characters involved. A word of caution about purpose: bulk-generated near-identical text is fine for testing your own software and toxic for publishing. Search engines treat clusters of templated pages or passages as doorway content; the tool keeps output in one box precisely so it can be pasted into a test harness rather than onto a website.
Targeted Use Cases
- Generating 500 fake chat or log lines to test scrolling, pagination and virtualised lists.
- Producing comma-separated placeholder tokens for a form or API test.
- Sizing a payload: repeat a character or word and read the exact length before sending it.
- Creating filler of a precise length to test layout overflow and truncation behaviour.
Notes & Gotchas
- Include the separator in your arithmetic: N copies joined by a newline produce N−1 newlines, and the counter reflects that.
- Keep emoji in mind when the count must be exact — .length counts each astral character as two units.
- Use none as the separator when building identifiers, but check the result for accidental collisions between copies.
- Test with a count you will actually hit in production; behaviour rarely changes between 10 and 1,000 copies, but layout performance often does.
Frequently Asked Questions
What is the maximum number of repetitions?
One thousand, enforced by the slider and an internal clamp. Values above it are capped rather than erroring, because the practical limit is browser responsiveness, not the string machinery itself.
Why does the output length disagree with my own count?
The counter shows JavaScript .length, which counts UTF-16 code units. Emoji and other astral-plane characters occupy two units each. If you count code points or graphemes, subtract one per astral character.
Is the repetition instant, even at high counts?
Yes for the supported range. The output is built with array join — a single allocation — rather than repeated string concatenation, so even a thousand long copies re-render live while you drag the slider.
Can I repeat a multi-line block?
Yes — paste a multi-line block and choose a separator such as a blank-line-like pattern by using new line twice in the text. The tool repeats the block verbatim, including its internal line breaks.