A YAML sequence generator
This tool emits a YAML block sequence - a flat list where every non-blank input line becomes `- value`. There is no mapping (key/value) support, no nesting, no anchors, no flow style. If you need those, you probably want to write YAML directly. This is for the common case where your source is a plain list and the consumer is a YAML-reading config file, fixture, or API.
Quoting is automatic. A value is wrapped in double quotes when it contains any character that would confuse a YAML parser: `:` (mapping delimiter), `#` (comment), `[`, `]`, `{`, `}` (flow containers), `&`, `*` (anchors/aliases), `!` (tag), `|`, `>` (block scalar headers), `'`, `"`, `%`, `@`, backtick, or `,` (flow separator). Values with leading or trailing whitespace are also quoted so the spaces are preserved.
Embedded double quotes inside a quoted value are escaped with a backslash (`"He said \"hi\""`). Values that look like YAML special tokens - `true`, `false`, `null`, `yes`, `no`, numbers, or ISO dates - are emitted as-is, which means a YAML parser will interpret them as their typed values (boolean, number, date) rather than strings. If you need everything to stay as strings, quote the source or use the JSON tool instead.
How to use convert a list to yaml
- 1Paste your list into the input panel, one value per line
- 2Output updates live - each non-blank line becomes `- value` in a YAML sequence
- 3Values with reserved characters or edge-whitespace are auto-quoted so the result parses cleanly
- 4Copy the YAML or download it as a .yaml file from the output panel
Keyboard shortcuts
Drive ListShift without touching the mouse.
What this generator actually does
Fixed behaviors - there are no user-adjustable options on this tool.
Emits a YAML block sequence
Each non-blank input line becomes one `- value` entry in a flat top-level sequence. No mapping, no nesting, no flow syntax. The output is valid YAML 1.1/1.2 that any mainstream parser (PyYAML, js-yaml, yq, Ruby Psych) will read as a list of strings or inferred types.
Automatic quoting for reserved characters
Values containing any of `: # [ ] { } & * ! | > ' " % @ backtick ,` are wrapped in double quotes to prevent the parser from treating them as YAML syntax. Embedded `"` inside a quoted value is escaped with backslash.
Leading and trailing whitespace preserved via quoting
A value with whitespace at the start or end gets auto-quoted too. Without quoting, YAML parsers strip edge whitespace, so the quoting is what makes `" padded "` round-trip exactly as you typed it.
Typed tokens emitted literally
If a value is literally `true`, `false`, `null`, a number, or an ISO date, it is emitted unquoted. A YAML parser will then interpret it as a boolean, number, or date - not a string. Useful when you want types; a footgun when you don't. Prefix with a space or add quotes in your source to force string interpretation.
Blank lines dropped; runs in your browser
Empty and whitespace-only input lines are filtered out before emission. Nothing is sent to our servers - everything runs client-side, which matters when your list contains PII, internal IDs, or anything else you would not paste to a third-party service.
Worked example
Values with `:`, leading `-`, or looking like YAML literals are handled per the rules above.
apple true 2025-01-01 - bullet already value with: colon
- apple - true - 2025-01-01 - "- bullet already" - "value with: colon"
Behavior reference
No user options. These are the fixed rules the generator applies.
| Rule | What it does | Example |
|---|---|---|
| Sequence wrapping | Every non-blank line becomes a `- value` entry in a block sequence | `apple` → `- apple` |
| Reserved-character quoting | Values with `: # [ ] { } & * ! | > ' " % @ backtick ,` get wrapped in double quotes | `value with: colon` → `"value with: colon"` |
| Edge-whitespace quoting | Values with leading or trailing whitespace get quoted so the spaces survive the round-trip | ` padded ` → `" padded "` |
| Typed tokens stay unquoted | `true`, `false`, `null`, numbers, ISO dates are emitted literally - parsers will read them as typed values, not strings | `true` → `- true` (parses as boolean) |
| Embedded quote escaping | Double quotes inside a quoted value are escaped with backslash | `He said "hi"` → `"He said \"hi\""` |
| Blank lines (automatic) | Empty and whitespace-only input lines are skipped | A trailing blank line produces no extra sequence entry |