Swelıty
Tools for everyone

Free Online YAML Playground

Write YAML and see it checked and shown as a tree as you type. Handles anchors, aliases and several documents, and shows the line of any error.

Auto-run is on, so the preview updates as you type. Your YAML is checked and shown as a tree. Anchors, aliases and several documents in one file are supported.

YAML

Preview

How to use

  1. Type or paste YAML in the editor.

  2. Watch the tree in the preview update as you type. Click a key to open or close it.

  3. If the YAML is not valid, the preview shows what is wrong and where.

  4. To change it into JSON, use the YAML ↔ JSON Converter.

  5. Use the icons in the editor to copy the code, open a file, download a zip of your files or clear everything.

  6. Open the full screen editor for more room, and use the A buttons to resize the text.

  7. Press Format to tidy the code, or untick Wrap long lines to scroll sideways instead.

Why use this tool

  • Checked as you type

    A real YAML parser reads your text, so errors are the ones you would see in your own tools.

  • Anchors and aliases

    Values reused with & and * and merged with << are filled in, so the tree shows the final result.

  • Several documents

    A file with documents separated by --- is shown as a list of documents.

  • Nothing of yours is run

    Your text is only read as data and shown as a result. No scripts run, and nothing is loaded from another site.

  • Format code

    Tidy the indentation and spacing with one click or Shift + Alt + F.

  • Comfortable editor

    Resize the text, switch line wrapping on or off, or go full screen with the editor and preview side by side.

About this tool

Check YAML as you type and see how it is read. Paste or write YAML and the playground validates it straight away and shows it as a collapsible tree of lists, objects and values. If something is wrong, the preview shows the error with its line and column. It handles anchors, aliases and several documents in one file, as used in docker-compose files and CI pipelines, which makes it handy for learning YAML, checking a config or finding a bad indent.

The YAML Playground checks your YAML and shows how it is read. Paste or write YAML and it is validated straight away and shown as a collapsible tree of lists, objects and values. If something is wrong, the error appears with its line and column, so you can fix it quickly.

It handles anchors, aliases and several documents in one file, as used in docker-compose files and CI pipelines. To convert between formats, use the YAML to JSON Converter, and to check JSON use the JSON Validator.

Frequently asked questions

The most common causes are tabs used for indentation (YAML only allows spaces), values indented differently from their siblings, and a missing space after a colon. The error shows the line and column.

The data your YAML describes: objects as keys with values, lists as numbered items, and the type of each value. Strings are in quotes, so "8080" and 8080 are easy to tell apart.

Yes, with the YAML ↔ JSON Converter. This playground is for writing and checking YAML.

Only to open the page. The preview is made in your browser, and nothing is loaded from another site.

Yes. Press Format, or Shift + Alt + F while you are typing, to tidy the indentation and spacing. If the code has an error it is left unchanged and the error is shown.

Your last session is kept in this browser, so it is here when you come back. Use Download to keep a copy as a file.

Paste your YAML. It is checked as you type, and any error is shown with its line and column.

Yes. Anchors, aliases and multiple documents in one file are handled, which covers most compose and pipeline files.