Skip to content
Devtoolry

YAML Formatter

Format and normalise YAML files with consistent indentation using Prettier.

About the YAML Formatter

Inconsistent indentation is the most common cause of broken YAML. The YAML Formatter normalises indentation and spacing with Prettier so configuration files stay readable and valid.

Everything runs in your browser, so your input is never uploaded to a server.

How to use the YAML Formatter

  1. Paste YAML or open a .yml/.yaml file.
  2. Review the formatted output.
  3. Copy or download it.

Frequently asked questions

Are comments preserved?

Yes. Comments stay attached to the lines they describe.

Can it convert YAML to JSON?

Use the YAML to JSON converter for that; this tool keeps the format as YAML.