About this text repeater

A small, dependency-free tool for one job: joining N copies of a piece of text together with the separator, numbering and trailing-separator options you choose, safely and instantly, without ever sending what you typed anywhere.

Why it exists

Repeating a line of text a set number of times sounds trivial until you actually need it — filling a spreadsheet column with the same sample value fifty times, building a numbered checklist skeleton, or getting an exact-width ASCII divider — and typing or pasting it by hand is slow and error-prone once you go past a handful of copies. This tool does the joining for you, with the small but easy-to-get-wrong details handled correctly: an empty request gives back nothing rather than an error, a request that is too large is capped to whole repetitions rather than left to freeze the tab, and a custom separator is respected exactly as typed, including one that is deliberately empty.

How the output is built

Each repetition is generated as its own "unit" first, then all of the units are joined:

unit(i) = numbered ? (i + ". " + text) : text output = unit(1) + sep + unit(2) + sep + … + sep + unit(N) if trailing separator: output += sep

Units are appended one at a time to an array and joined once at the end, rather than concatenated into a growing string on every step — the difference matters for very large repeat counts, where repeated string concatenation degrades badly while an array join stays linear in the total output size.

The running character total is tracked after every unit is added. The instant adding the next unit (plus its separator) would push the total past 500,000 characters, the loop stops. That means the result is always some whole number of complete repetitions — never a copy sliced off in the middle — and the interface reports exactly how many of the requested repetitions made it in.

A second, independent limit caps the loop at 100,000 repetitions regardless of character count. This exists because the character cap alone cannot catch every runaway case: with an empty text field, no separator and numbering off, every "unit" is a zero-length string, so the character total never grows no matter how many times the loop runs. The repetition-count ceiling stops that loop from spinning forever even though it would never produce a single visible character.

How it was tested

The repetition and separator logic lives in its own module with no DOM access, so it can be run and asserted against directly under Node.js rather than only checked by eye in a browser. The cases exercised before release:

Test cases run against the repetition logic
CaseInputExpected output
Basic join"ab" ×3, new lineab ab ab
Zero repetitions"ab" ×0"" (empty)
Negative / non-numeric countcount: -5, NaN, "abc"treated as 0, never throws
Numbering"x" ×3, numbered1. x 2. x 3. x
Character cap5-char unit ×100, cap 23exactly 4 whole units, never a partial one
Repetition-count capempty text, no separator, count 999,999,999stops at 100,000, flagged as capped
Custom separator"ab" ×3, sep " | "ab | ab | ab
Trailing separator"ab" ×3, comma, trailing onab, ab, ab,
Trailing separator vs. the captrailing sep would exceed the capdropped rather than overflowing the limit

All of the above pass as automated assertions, run under plain Node.js against the same module the page loads — there is no separate "test version" of the logic to drift out of sync with what actually ships.

How the site is built

  • Static HTML, one small stylesheet, two small scripts. No framework, no build step, no bundler.
  • Nothing from the network. No CDN framework, no web font, no remote image; the favicon is an inline SVG data URI. Once the page has loaded it keeps working offline.
  • System font stack. Your operating system's own UI font, so nothing has to download and nothing shifts as the page loads.
  • Nothing you type is transmitted. The text box, the count, the separator and every option are read directly in your browser; there is no server call anywhere in the tool.
  • Dark mode follows your system setting via prefers-color-scheme.

Scope and honesty about limits

This tool repeats one piece of text identically, with only an optional numeric prefix varying between copies. It is not a random-text or placeholder-paragraph generator — for varied filler copy, the Lorem Ipsum generator is built for that. It does not lay out multi-line ASCII art, and it has no ability to send, post or submit anything anywhere; it only produces text for you to copy elsewhere. The 500,000-character and 100,000-repetition caps are deliberate safety limits, not bugs — see the FAQ on the main tool page for exactly how they behave.