YAML Converter

Convert between YAML and JSON with control over indentation and style.

Works offline Native desktop macOS & Windows
YAML Converter
What it does

Config formats rarely match the tool that needs them: Kubernetes wants YAML, an API wants JSON. The YAML Converter in HackUtilities converts in both directions and lets you decide how the output looks. Both conversions run locally, so config with internal hostnames or secrets stays on your machine.

Two-way conversion

Press YAML to JSON or JSON to YAML depending on what you pasted. Parse errors are shown instead of output.

JSON indentation

Output JSON minified or indented with 2, 4 or 8 spaces.

YAML indentation and key sorting

Dump YAML with 2, 4 or 8 space indentation and optionally sort keys alphabetically.

Block or flow style

Keep YAML in block style, or switch to flow style from level 0, 1 or 2 to get compact inline collections.

Samples and copy

Load a YAML or JSON sample to try the options, and copy the output with one click.

FAQ

Are YAML comments kept when converting to JSON?

No. JSON has no comments, so they are dropped when YAML is parsed. Converting back to YAML does not restore them.

Can I convert YAML with multiple documents?

The tool parses a single YAML document. If your input contains several documents separated by ---, the parser reports an error.

Pairs well with
All 46 tools →
Try YAML Converter free for 14 days

No card, no account. Every tool included, bought once.

Download