GenerateRandomSearch

YAML Sample Generator

Generates a small, self-contained YAML fixture — service config, user record, pipeline stages — for testing a parser or documenting a config shape without writing one from scratch.

What you'll get

This generator draws from a hand-checked list of 8 entries. Here is a spread of 6 of them, so you can see the style before you generate:

  • name: sample-service version: 1.4.0 env: staging features: - search - export replicas: 3
  • user: id: 4821 name: Sample User active: true roles: - viewer - editor
  • database: host: localhost port: 5432 ssl: false pool_size: 10
  • settings: theme: dark notifications: true language: en-GB
  • product: sku: SKU-48213 price: 19.99 currency: GBP in_stock: true
  • job: name: nightly-export schedule: "0 2 * * *" retries: 3 enabled: true

A fixed sample of the list, not a live draw — your own results are picked at random from all 8, without repeating until the list runs out. Original authoring for Generate Random — illustrative fixture-style YAML, no real service configuration.. Last reviewed 2026-07-18.

How to use this tool

  1. Press generate for a YAML sample.
  2. Copy it, or generate again for another one.

Common use cases

  • Testing a YAML parser
  • Documentation config examples
  • Quick fixture data

Limitations and good to know

  • 8 fixed fixtures. They cover common shapes at a glance rather than YAML's fuller feature set — anchors, multi-document files and explicit tags do not appear in any of them.
  • Each is a small, flat-ish structure for readability; real config files are often deeper and larger.
  • These are fictional samples, not a real service's actual configuration schema — treat field names as illustrative rather than as a spec to code against.

Practical tips

  • Validate the sample before relying on it; YAML's indentation rules make it easy to produce something that parses differently from how it reads.
  • Watch for values like `yes`, `no` and `on` — older YAML parsers read them as booleans rather than strings.

Entries are chosen with your browser's cryptographic random number generator, so every entry on the list is equally likely. How Generate Random works.

Frequently asked questions

Why do yes, no and on need special care in YAML?
Older YAML parsers (following YAML 1.1) treat unquoted yes, no, on, off, true and false as booleans rather than strings — so a country code of NO (Norway) or a setting genuinely meant to be the string "yes" can silently become a boolean. Quoting the value explicitly avoids the ambiguity.