🧰Locly

YAML Formatter and Validator

Format and validate YAML with line/column errors

About This Tool

YAML Formatter and Validator beautifies YAML with 2 or 4 space indent, optional key sorting, and multi-document --- support. Parser errors include line and column. Formatting runs locally in your browser.

How to Use

  1. Paste YAML
  2. Choose indent and sort options
  3. Click Format & Validate
  4. Fix any line/column errors shown
  5. Copy or download the result

Common Use Cases

  • DevOps: Clean Kubernetes or CI configs
  • Reviews: Make messy YAML readable
  • Docs: Pretty-print examples
  • Debugging: Jump to the failing line/column
  • Privacy: Format offline without cloud editors

FAQ

Q1: Does multi-document YAML work?

Yes. Documents separated by --- are parsed with loadAll and written back with separators.

Q2: What do line and column mean?

They point to where the YAML parser failed so you can fix indentation or syntax quickly.

Q3: Can I sort keys?

Yes. Enable Sort keys to output mappings with sorted keys at each level.

Q4: Is my data uploaded?

No. Everything runs locally in your browser and is never uploaded.

Q5: Is YAML executed?

No. The tool only formats and validates text — it never runs code from your YAML.

Related Tools