Technical explainer — how the repeater tools run in your browser, the algorithm, output limits, and shareable URLs.
When you load any page on textrepeat.net, your browser downloads three files: the HTML page itself, the shared CSS (assets/style.css), and the tool-specific JavaScript. Total page weight is around 80 KB — about the size of a small image. After load, the page works offline.
When you type into an input field, an input event fires on every keystroke. The handler reads your text and the repetition count, builds the output string in memory, and writes it to the result panel. All of this happens in your browser's JavaScript runtime — no network requests are made for the repetition itself.
For most tools, the math is just Array(count).fill(text).join(separator). This is JavaScript's native way of building a repeated string, and it's extremely fast — even 100,000 repetitions of a 20-character string completes in under 50 milliseconds on any modern device.
For the stress test generator and character repeater, we use String.prototype.repeat(n) directly, which produces output by exact size. The browser allocates a single contiguous string in memory, which is faster than repeated concatenation.
Browsers handle large strings well, but at extreme sizes (~10+ million characters) things slow down. Rendering the output in a textarea, copying to the clipboard, or downloading as a file all become noticeably laggy. We cap at:
Beyond those caps, generating output via a Python or shell one-liner is faster than a browser-based tool.
The "Share link" button reads the current state (input text, count, separator, options) and encodes it as URL query parameters. The shared URL looks like:
https://textrepeat.net/?t=Happy%20Birthday&n=50&sep=newline&num=1
When someone opens that URL, the page reads the parameters and pre-fills the inputs. This works without any server-side storage — the URL itself carries the state. There's a limit (most browsers and servers reject URLs over ~2,000 characters), so this works for short input text, not for paragraphs.
The dark mode toggle adds a data-theme="dark" attribute to the document root. CSS variables for colors then resolve to dark-theme values. Your choice is saved in localStorage under the key tr_theme so it persists across sessions.
The server's job is to deliver static HTML, CSS, JS, and assets — that's it. There's no application server, no database, no API. Every "calculation" happens in your browser. This is the same architecture as urlencodedecode.com and base64decode.tools.
Not currently, but the code is small, readable, and inspectable in your browser's DevTools. View the page source on any tool to see exactly what's happening. If there's interest in open-sourcing the codebase, email us.