inyourbrowser.com

Format YAML Online

Paste any YAML document and get a cleanly indented, normalised version instantly. The formatter handles complex nested structures, anchors, and multi-document files using the js-yaml parser.

Input YAML
Formatted YAML

ACTION

INDENT

Runs entirely in your browser

How it works

The tool uses js-yaml, a YAML 1.2 parser written in pure JavaScript. The library runs in a Web Worker that starts when the page opens; it parses the input into an in-memory tree and re-emits it using the chosen indentation. Validation surfaces any parser error along with the line where it occurred.

Processing runs in your browser

All parsing and conversion happens locally in your browser tab. Our servers are not involved at any point.

Frequently asked questions

Is my YAML sent to a server?
All processing runs in your browser using the js-yaml library bundled with the page. Our servers are not involved at any point.
Can the formatter handle Kubernetes manifests?
Yes. Kubernetes manifests, Helm charts, and any standard YAML 1.2 documents are supported, including multi-document files separated by triple-dash markers.
What indentation does the formatter use?
Two spaces by default, with an option to switch to four. Indentation is applied consistently across nested mappings and sequences.
Does formatting change the meaning of my YAML?
Formatting re-emits the parsed data with consistent indentation and quoting. Numbers are written in plain decimal form, so 1.0 becomes 1 and 0x1F becomes 31, and keys that are whole numbers move to the front of their mapping. Integers larger than 9007199254740991 can lose precision because JavaScript stores numbers as 64-bit floating point; the tool shows a note when the document contains one, and quoting large IDs keeps them exact. Comments are dropped.
Will comments survive the format step?
The js-yaml parser drops comments during parsing. If preserving comments is important, keep the original file and use the formatter for review or normalisation only.

Last reviewed September 30, 2026

Other pages for this tool

Related tools

XML formatter
Pretty-print, minify, and validate XML. Uses the browser's native DOMParser.
JSON formatter
Pretty-print, minify, validate, and sort JSON keys. Instant output.
SQL formatter
Beautify and format SQL queries. Supports MySQL, PostgreSQL, T-SQL and standard SQL.
CSV ↔ JSON
Convert CSV to JSON and JSON back to CSV. Handles quoted fields and downloads.