Skip to content
LocalOnly
Developer Utilities

Lorem Ipsum Alternatives: Realistic Test Text

Lorem ipsum has short, even words, so it hides the layout bugs real content exposes. Here is a set of test strings worth keeping next to it, and the CSS that keeps them from breaking a layout.

Updated October 18, 20263 min readTool runs in your browser

Lorem ipsum alternatives are worth having because lorem ipsum is polite text: Latin-looking words of similar length, all ASCII, read left to right. Real content is not. The Lorem Ipsum Generator is right for filling a mock-up, and its page explains where placeholder text misleads. This guide gives you the strings to test with once the layout exists.

Test strings to use instead of lorem ipsum

const testStrings = [
  "Donaudampfschifffahrtsgesellschaft",            // one long German word
  "Maria José Fernández de la Torre-Ortiz",        // long name, accents, hyphen
  "Siobhán O'Connor-Smythe",                       // apostrophe and accents
  "李伟",                                           // two characters, no spaces
  "مرحبا بالعالم",                                  // Arabic, right to left
  "שלום עולם",                                      // Hebrew, right to left
  "Order shipped 📦 to Zoë",                       // emoji and diaeresis
  "https://example.com/a/very/long/path/without/any/spaces/that/cannot/wrap",
  "",                                              // empty value
  "    ",                                          // only spaces
];

Run each one through every place that shows user text: names in headers and avatars, product titles in cards, table cells, buttons, notifications and emails. Each string targets one class of bug.

What each kind of string finds

  • Long words and URLs have nowhere to wrap, so they overflow their box or stretch a table column across the page. German compounds, Finnish words and pasted links do this in real data.
  • Names break validation as well as layout: forms that reject apostrophes, hyphens or accents, or that assume a first and last name.
  • Short CJK text exposes the opposite problem: a layout that looks empty or misaligned when a name is two characters long.
  • Right-to-left text shows whether punctuation, icons and alignment flip correctly, and whether mixed text stays readable.
  • Emoji count as two JavaScript characters each, so a 20-character limit cuts them in half and leaves a broken symbol.
  • Empty and blank values show what a card or list item looks like with nothing to display, the state that is most often missing from designs.

Text that grows in translation

Interface text is usually written in English first, and many languages need more room. Short labels grow the most in relative terms: a two-word button can double in length. Before translations exist, test with English strings made noticeably longer, for example by repeating a word or appending extra characters, to find buttons and menus that have no room to grow.

CSS that handles real text

.card-title {
  overflow-wrap: anywhere; /* break long words and URLs instead of overflowing */
}

.prose {
  hyphens: auto;           /* needs a lang attribute, e.g. <html lang="de"> */
}

.label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* one line, with ... when it does not fit */
}

For right-to-left support, set dir="auto" on elements that show user content, so the browser picks the direction from the text itself, and use logical CSS properties such as margin-inline-start instead of margin-left, so spacing flips with the direction.

Frequently asked questions

Command Palette

Search for a tool or command