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.

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

  1. Paste YAML or upload a file. Start with retries: 3 to inspect a simple numeric value.
  2. Choose indentation and comment settings, then format the document.
  3. Use syntax validation for parse errors. For data rules, supply a JSON Schema and run schema validation.
  4. Review the output and errors before copying or downloading. Test the configuration in its target application separately.