YAML Formatter
Make YAML easier to read with consistent indentation. The formatter checks that the output keeps key order, scalar text, comments and references before it offers a result.
YAML input
YAML 1.2 Core · Up to 256 KiB and 32 documents. An initial BOM is removed and CRLF becomes LF.
Formatted YAML
Formatting runs in your browser. Text is kept in this editor until you clear it or leave the page.
Format YAML
- Paste one YAML document or a stream, or load the example.
- Choose two or four spaces and select Format YAML.
- Review and copy the checked result. You can select the text manually if clipboard access is unavailable.
What the formatter keeps
Mapping order, sequence items and document boundaries stay in place. Quoted values and the original spelling of numbers are checked before the result is shown.
An anchor names a node and an alias refers to it. The formatter checks which node each alias refers to without expanding the references.
Comments are checked for both text and placement. YAML characters inside a quoted string or block string remain part of its value.
Use the result in a review
Load the Build example to see a nested jobs list with consistent indentation and a comment still next to the same step.
A value such as 9007199254740993 needs to keep its digits. If formatting would change them, the tool withholds the candidate.
Supported YAML and limits
The tool accepts a bounded YAML 1.2 Core profile. Custom application tags, duplicate keys and unresolved aliases need a different editor.
Some valid sources have layouts the formatter cannot rewrite while keeping their details. An explanation appears instead of changed YAML. Configuration-specific validation belongs to the application that reads the file.
Local editing
Formatting runs in your browser. YAML drafts and results stay out of application storage and URLs. Copy writes the current checked output when you request it.
YAML formatting questions
Sources
Related tools
JSON to TypeScript
Infer a TypeScript type alias from a JSON sample, then review, copy or download the code.
Open tool — JSON to TypeScriptJSON to YAML
Convert JSON to YAML locally while preserving number text and quoted strings; copy or download the complete result.
Open tool — JSON to YAMLYAML to JSON
Convert one YAML document locally to JSON with exact number text and bounded aliases, then copy or download the complete result.
Open tool — YAML to JSONXML Formatter
Check namespace-aware XML 1.0, format or compact locally, and copy or download UTF-8 output.
Open tool — XML FormatterJSON Formatter & Validator
Check JSON syntax, format or minify locally, and copy or download output while preserving original data tokens.
Open tool — JSON Formatter & Validator