Random YAML

按条数与字段数生成随机 YAML。

What Is a Random YAML Generator?

YAML is a lightweight data format that uses indentation to express hierarchy and is a favorite for configuration files. This tool generates a random YAML document with items as its top-level structure, based on the record and field counts you choose, quoting and escaping values with special characters so the syntax stays valid.

Key Features

  • Adjustable records (1-200) and fields (1-30), defaulting to 5 records by 4 fields
  • Records and fields generated under a top-level items key using indentation
  • Automatic double quotes and escaping for values containing special characters or whitespace
  • Clean, parseable indented lists
  • Copy, demo, and clear buttons included

Use Cases / Notes

Great for preparing random sample data for config management, YAML parsing tests, or CI/CD pipelines. The structure is for demos and field names are fixed at field1, field2, so edit the output when you need specific keys.

How to Use

  1. Enter the record and field counts (leave blank for defaults)
  2. Click Generate to get an indented random YAML document
  3. Click Copy to use the result