Skip to content
Tezmy Tools

Random YAML Generator

Make random YAML records for sample config, fixtures and tests

All names, emails and places are made up. Emails use example.com.

Runs in your browser. Nothing is uploaded.

About the Random YAML Generator

When you need a YAML file to test a parser, fill a config template or demonstrate a tool, writing records by hand is slow. This generator makes them for you. Choose how many records you want, tick the fields to include, and pick a list or a map layout. Each record has made-up but realistic values: an id, a name, an email on example.com, an age, a true or false flag, a decimal score, a date, a company, a list of tags and a nested address. The YAML is valid, indented the way you choose, and ready to copy or download as random.yaml. Everything happens in your browser, and no real people are involved.

Updated October 2026

How to use the Random YAML Generator

  1. 1Enter how many records you want, from 1 to 200.
  2. 2Choose a list of records or a map keyed record_1, record_2 and so on.
  3. 3Choose how far nested values are indented.
  4. 4Tick the fields you want in each record.
  5. 5Press Generate, then copy the result or download it as random.yaml.

What the output looks like

With the default fields, each record has an id such as usr_1c772483, a name, an email, an age and a true or false flag, plus a list of tags. Ticking the extra fields adds a score, a joined date, a company and a nested address.

  • id: usr_1c772483
  • name: Xavier Alvarez
  • email: [email protected]
  • tags: a list with one to four items, none repeated
  • address: street, city, state and zip, with one city per record

When random YAML is useful

  • Testing a YAML parser or linter with many records at once.
  • Filling a template, such as a Kubernetes, CI or app configuration example, with believable values.
  • Writing a tutorial or documentation that needs sample data nobody will mistake for real people.
  • Checking that code copes with nested maps, lists, booleans and numbers together.
  • Making a quick fixture file for a unit test.

Choosing a layout and indent

A list is the most common shape for records: it maps straight to an array in JSON, Python or JavaScript. A map is useful when you want to refer to an entry by its key. Both are valid YAML.

Two spaces is the usual indent in YAML files. Pick four if your project style asks for it. YAML does not allow tabs for indentation, so the generator never uses them.

Quoting rules the generator follows

YAML decides what a plain value means from how it looks. The text 62701 is a number, 2024-03-05 can be a date, and no or on can be booleans in older parsers. To keep your data stable the generator wraps these in double quotes, and leaves ordinary words and names plain so the file stays easy to read.

Phone and computer

The options are listed above the result. On a phone they stack in one column, and the result box scrolls inside the page. Copy and Download sit under the result. Sample YAML is useful for testing config readers. Convert it with the YAML to JSON Converter, go the other way with the JSON to YAML Converter, and make people-like records with the Fake Data Generator.

Features

  • Ten fields: id, name, email, age, active, score, joined, company, tags and address
  • A list of records or a map of records
  • Nested maps and lists, so you can test deeper structures
  • Two or four space indentation
  • Values that could be misread as numbers, dates or booleans are quoted
  • Fresh random data on every press, made on your device

Frequently asked questions

Is the data real?

No. Names are picked from lists of common first and last names and mixed at random, emails always end in example.com, and addresses use made-up street numbers. It is safe for demos and tests.

Is the YAML valid?

Yes. The output uses block style with consistent indentation, and strings are quoted when a plain value could be read as a number, a date, a boolean or a mapping. It parses with standard YAML 1.1 and 1.2 parsers.

What is the difference between the list and the map layout?

A list starts each record with a dash and keeps them in order. A map gives each record a key, record_1, record_2 and so on, which suits data you look up by name.

Why are some values in quotes?

A zip code such as 62701 or a date such as 2024-03-05 would be read as a number or a timestamp by some parsers. Quotes keep them text so every parser sees the same thing.

Can I get repeatable output?

No, each press makes new data using your browser's random generator. Copy the result if you need to keep it.

How many records can I make?

Up to 200 at a time. For more, press Generate again and join the results, or use a script.

Can I turn the result into JSON or CSV?

Yes. Use our YAML to JSON or YAML to CSV converters on the output.

Does it send anything to a server?

No. The data is made in your browser and never leaves your device.

Related tools