DevConvertor

YAML Formatter

Parse and re-emit YAML with consistent 2-space indentation using js-yaml, preserving nested objects, arrays, and data types along the way.

ReadyMarkup ToolsFree · No account required

Features

  • Consistent 2-space indentation
  • Preserves nested objects, arrays, and data types
  • Real parsing with js-yaml, not string manipulation

How to use

  1. Paste your YAML into the input.
  2. Click Format.
  3. Copy or download the result.

Example

Input

a: 1
b:
- x
- y

Output

a: 1
b:
  - x
  - y