mtools.lol

YAML Formatter

Format and validate YAML, keep comments, or convert it to JSON.

How it works

  1. 1Paste your YAML.
  2. 2Choose the indentation or JSON output.
  3. 3Copy or download the result.

Features

  • Validates as you type, with the line of any error.
  • Comments are kept when formatting.
  • Convert to JSON in one click.
  • Supports multi-document files.

Frequently asked questions

Why is my YAML invalid?

Usually tabs used for indentation, inconsistent indentation, or a colon inside an unquoted value.

Are comments kept?

Yes when formatting as YAML. JSON has no comments, so they are dropped there.

Is my data sent anywhere?

No. Everything runs in your browser; nothing is uploaded.