YAML Formatter
Format YAML with indentation, key sorting and comment options. Check syntax or validate data against a JSON Schema draft-07, then copy or download the output.
Format YAML with indentation, key sorting and comment options. Check syntax or validate data against a JSON Schema draft-07, then copy or download the output.
- Prepare your input
Choose the relevant options using the controls below.
- Run your task
Adjust the controls below and inspect the preview.
- Use the result
Check the result, then use the available copy or download controls.
Scope and limits
Syntax uses js-yaml 4.1.0 DEFAULT_SCHEMA. Comment-preserving formatting uses yaml 2.8.1 and checks the same parsed values. Schema validation uses your JSON Schema draft-07 with Ajv 8.17.1; unknown formats/keywords fail. This is not deployment or runtime validation.
YAML Input
Settings
Formatted Output
Formatted Output
YAML Formatter
Make a YAML configuration easier to review by applying consistent indentation and presentation. Choose whether to preserve comments, sort keys or use flow style. Formatting changes the document’s representation; it does not optimize the application or verify that a deployment will succeed.
Syntax checking and schema validation answer different questions. Syntax checks whether the YAML can be parsed; your JSON Schema draft-07 checks the resulting data structure. For example, retries: 3 is a number, while retries: "3" is a string, which can matter to a schema. YAML and schema inputs each have a 1 MB UTF-8 limit. Unknown schema keywords/formats are rejected rather than silently accepted.
Features
- Format YAML with indentation, quote and flow-style options.
- Choose comment preservation and key sorting.
- Check YAML syntax or validate against your JSON Schema draft-07.
- Copy or download formatted YAML and inspect reported errors before use.
How to use
- Paste YAML or upload a file. Start with retries: 3 to inspect a simple numeric value.
- Choose indentation and comment settings, then format the document.
- Use syntax validation for parse errors. For data rules, supply a JSON Schema and run schema validation.
- Review the output and errors before copying or downloading. Test the configuration in its target application separately.