YAML Formatter

Beautify and prettify YAML instantly — no upload, fully private. 100% free.

Runs 100% in your browser. Your data never leaves this page.

Built for Obsidian, Hugo, Jekyll, and CI pipelines.

How to use

  1. Paste your YAML (however messy) into the input box.
  2. The formatted YAML appears on the right.
  3. Copy or download the cleaned result.

Re-indents your YAML with consistent 2-space indentation and readable structure.

Example

Input
name: demo
config: {debug: true, level: 3}
items: [a, b, c]
Output
name: demo
config:
  debug: true
  level: 3
items:
  - a
  - b
  - c

When this works best

Formatting only re-indents and re-flows; it does not change values. Anchors and merge keys are expanded, and comments are dropped during the re-dump.

How it differs from related tools

The YAML Minifier shrinks YAML into compact flow style; the Formatter keeps block style but only re-indents for readability.

Frequently asked questions

Is the YAML formatter free?

Yes, it runs in your browser and is free with no sign-up.

Will formatting change my data?

No. Formatting only changes whitespace and structure, not values.

Does formatting change my values?

No. It only adjusts whitespace and indentation; the data stays identical.

Are my comments kept?

No — js-yaml re-dumps the parsed structure, so comments, anchors, and aliases are dropped.

Related converters

Learn more about YAML