YAML Beautifier
Paste YAML to re-indent it and pretty print it; invalid YAML is reported with the error.
Paste YAML to re-indent it and pretty print it; invalid YAML is reported with the error.
---The YAML is parsed with js-yaml and written back out with two-space indentation. Parsing first means the output is guaranteed valid and every document in a multi-document file is formatted. Comments are not kept, because YAML parsers discard them, so keep your original if comments matter.
server: {host: localhost, port: 8080}
features: [auth,logging]becomes
server:
host: localhost
port: 8080
features:
- auth
- logging
Yes. Both re-indent and normalize the YAML without changing the data.
YAML parsers drop comments, so re-serialized output cannot include them. Keep the original file if you need them.
Yes. Invalid YAML is rejected with the parser error, including the line.