>_devtools

YAML Formatter

Format and re-indent YAML, keep comments, sort keys, and handle multi-document files.

What this does

Re-indents YAML into a consistent layout. Comments, anchors, aliases, and the order of keys are kept unless you ask for sorted keys. Flow collections such as [a,b] are rewritten as [ a, b ] and long lines are folded at 80 columns.

Example

Input name: app with a four-space indented database: block comes back with two-space indentation and the same data. Use the Minify, Validate, and Tree tabs on the same page for the other views of the document.

Multiple documents

A file with several documents separated by --- is formatted document by document and the separators are kept. If any document has a syntax error the whole input is rejected and the error names the document, line, and column.

Limits

Duplicate mapping keys are reported as errors, as most YAML loaders do. Inputs over 5 MB are refused; parsing runs in a background worker so the page stays responsive.

Privacy

Everything runs in your browser. Your input is never uploaded, stored, or put in the URL.