Lorem Ipsum Generator
Generate realistic placeholder text for your designs and mockups.
The Lorem Ipsum Generator fills mockup layouts with realistic placeholder text in three shapes — Paragraphs, Sentences, or Words — from a count of 1 to 100. The Configure step lets you pick the Type, dial the Count (1–100) in the number input, and toggle "Start with \"Lorem ipsum\"" so output opens with the classical phrase regardless of which random word was drawn first. Hit "Generate" (toast: "Lorem ipsum generated!") and the flow advances to the Result step with a readonly "Generated Text" pane.
From Result you can Copy (toast "Copied to clipboard!"), Download as lorem-ipsum.txt, or Clear ("Cleared!"). Under the hood a 112-word classical LOREM_WORDS list feeds pickRandom: sentences randomize 8–18 words each, paragraphs randomize 4–8 sentences each joined with \n\n, so two runs never produce identical copy. Count guards enforce integers 1–100 in the onChange handler. Everything is local Math.random over an in-repo word list — no network, no lorem package.
How it works
lib/loremIpsum.ts holds a 112-word classical LOREM_WORDS list and a generateLorem({type, count, startWithLorem}) function: words mode joins count random words; sentences mode builds count sentences of 8–18 random words, each capitalized and period-terminated; paragraphs mode builds count paragraphs of 4–8 sentences joined with "\n\n". When startWithLorem is true, the opening of the entire result is rewritten to begin "Lorem ipsum…" even if the first random word differed.
The count input guards v >= 1 && v <= 100 in onChange so fractional or out-of-range values never reach the generator. Results land in the loremIpsumSlice and render in the readonly textarea. Download serializes the current text to a text/plain;charset=utf-8 Blob named lorem-ipsum.txt. All randomness is Math.random over the local word list — no fetch, no package.
How to use
- On Step "Configure", choose Type: "Paragraphs", "Sentences", or "Words".
- Set Count in the number input (label "Count (1–100)") — only integers 1–100 are accepted.
- Toggle the checkbox "Start with \"Lorem ipsum\"" on or off.
- Click "Generate" — toast "Lorem ipsum generated!" and the StepIndicator advances to "Result".
- Click "Copy" to grab the text (toast "Copied to clipboard!") or "Download" to save lorem-ipsum.txt (toast "Downloaded!").
- Click "Clear" to empty the result (toast "Cleared!") and reset the flow.
Tips
- Sentences randomize 8–18 words and paragraphs randomize 4–8 sentences — hit Generate again for fresh variety each time.
- With "Start with Lorem ipsum" on, only the opening of the whole result is forced to "Lorem ipsum"; interior sentences stay random.
- Paragraphs separate with double newlines (\n\n), so pasting into editors that respect blank lines keeps the structure.
- Count maxes at 100 — for wall-of-text stress tests, prefer Paragraphs at 100 rather than a single giant Words run.
Lorem Ipsum Generator FAQ
What's the maximum count?
100 — the label reads "Count (1–100)" and the onChange guard accepts only v >= 1 && v <= 100 integers.
Is the text really random?
Yes — pickRandom draws from LOREM_WORDS with Math.random also choosing sentence (8–18) and paragraph (4–8) lengths.
Does "Start with Lorem ipsum" change every sentence?
No — only the opening of the whole result is rewritten to begin with "Lorem ipsum"; the rest of the text remains randomly drawn.
What file is downloaded?
lorem-ipsum.txt, created as a text/plain;charset=utf-8 Blob of the current generated text.
Credits
- Classical lorem word list (in-repo) — LOREM_WORDS + generateLorem in lib/loremIpsum.ts; no lorem package