Lorem Ipsum Generator: how it works and how to build one
Placeholder paragraphs, sentences, words or list items. This guide explains what happens behind the button and shows the code, so you can build your own.
What it does
Fill mockups and test layouts with paragraphs, sentences or words of classic placeholder text. Output plain text or HTML paragraphs.
When to use it
- Mockups and wireframes
- Testing long text in layouts
- Seeding a CMS
How to use it
- Choose paragraphs, sentences or words and how many.
- Choose plain text or HTML.
- Copy the text.
Try it free in your browser, nothing is uploaded: https://eskillsfy.com/tools/lorem-ipsum
How it works
Lorem ipsum is scrambled Latin used as filler so a layout can be judged without real words distracting. The generator picks random words from a list, groups them into sentences of 8–18 words, capitalises the first word, adds a full stop, and groups sentences into paragraphs.
Starting with the classic ‘Lorem ipsum dolor sit amet’ is optional.
Build it yourself
Here is the core of the tool. It has no dependencies unless noted, so you can paste it into any TypeScript or JavaScript project.
lorem.ts (ts)
const WORDS = "lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor".split(" ");
const pick = () => WORDS[Math.floor(Math.random() * WORDS.length)];
const sentence = () => {
const s = Array.from({ length: 8 + Math.floor(Math.random() * 10) }, pick).join(" ");
return s[0].toUpperCase() + s.slice(1) + ".";
};
export const paragraph = () => Array.from({ length: 4 + Math.floor(Math.random() * 4) }, sentence).join(" ");
Make it production-ready
- Wrap output in <p> or <li> tags.
- Add commas at random to look more natural.
Questions
Why start with Lorem ipsum dolor sit amet?
It is the traditional opening. Untick the option to start with random words instead.
Free, runs in your browser, nothing is uploaded.