Format the stream you see
Format checks every document, then writes the whole stream back. Indentation applies only to the next format. Pasting and changing options do not rewrite the text.
YAML / TOML / ENV Config
Format the whole stream, then download one document only when you need it.
Format reads this document and, after the whole stream checks out, writes it back. Pasting, typing, and changing indentation or document scope do not rewrite it. Structure and anchors are read-only.
Enter YAML or choose an example.
Copy and Download export the full current document. Download this document exports only the selected document and does not replace the editor.
The first input allows 500,000 UTF-16 units, 100 documents, depth 100 and 50,000 nodes. A generated document can continue up to 2,000,000 units.
Processed in this browser. Your YAML is not uploaded. Undo and redo cover edits, formatting, the example, clearing, and restoring the original. Options are not history steps.
Use this YAML formatter before reviewing configuration that has accumulated inconsistent indentation. The output stays YAML, including the comments that explain why a setting exists and the anchors that connect reused values.
Format writes the checked stream back into the current document. Copy and download that full document. Choosing one document downloads only that part and leaves the editor unchanged.
Formatting rewrites the current document from its nodes, keeping comments, anchor names and original number text. It does not pass through JSON. Whitespace and some string spellings can still change.
Every document is checked before the stream is written back. Download this document exports one part only and does not replace the editor. An error in any document still blocks both actions.
Format checks every document, then writes the whole stream back. Indentation applies only to the next format. Pasting and changing options do not rewrite the text.
Ctrl/Cmd+Enter formats the current document. Undo restores the previous document, including manual edits. Example and Clear start a new document and can be undone.
Copy and Download export the full current document. After you select one document, Download this document exports only that formatted part and does not replace the editor. Structure and anchor lines follow the current document.
Choose two or four spaces for the next format. The current document changes only when formatting succeeds. Block strings stay scalar values and are not executed.
The YAML validator checks every document before returning output. Repeated scalar keys are compared by their Core meaning, including numeric spellings, rather than allowing a later value to overwrite an earlier one. The error identifies the input location. A YAML beautifier still checks every document before rewriting the current one.
Large integers and long decimal fractions keep their original numeric tokens instead of being rounded through a browser Number. Scientific notation and non-finite YAML values remain YAML. This does not guarantee that another application will parse them with equal precision.
Read mapping, sequence and scalar nodes with their source lines and document numbers. The reference view lists anchor declarations and alias targets. Summaries load in batches of 50; viewing a cyclic alias does not recursively duplicate its target.
Yes. Comments are kept on the document model and written into the output. This YAML formatter does not take a YAML → JSON → YAML route, which would lose comments. Review the separate output because indentation and other presentation details can still change.
Choose two or four spaces below the editors. Tabs are not an available indentation style. If the source cannot be parsed, selecting a different width will not guess how its hierarchy was intended to look.
The default exports the whole stream. Select a numbered document to export just that resource. Every document must pass syntax and duplicate-key checks first; an error in a different document still prevents exporting the selected one.
The formatter retains numeric tokens, comments and references while rewriting presentation. Types follow YAML 1.2 Core, so compatibility with a YAML 1.1 consumer requires a separate review. Quote an identifier if it should be text rather than a number.
No. A parsed mapping can still contain an invalid Kubernetes field or an incorrect workflow option. Format YAML online here to inspect syntax and layout, then use the application’s own validator before applying a configuration.
Found a configuration this tool handles incorrectly?
Use the YAML formatter to compare indentation, check the document selection and export the current result.