Zero Signup ToolsFree browser tools

Converter Tools

JSON to YAML Converter

Convert JSON to YAML in your browser. Block or flow style, configurable indent, smart string quoting, and downloadable .yaml output.

Output options

Style

Indent

String quotes

648 chars, 648 B

Parsing and conversion run entirely in your browser. The JSON pasted here never leaves your device.

What is preserved

  • null, booleans, and numbers map to their YAML equivalents.
  • Strings that look like numbers, booleans, or null are quoted so the round trip preserves their type.
  • Multi-line strings render as a YAML literal block scalar (|) to keep newlines exact.
  • Object keys with spaces, special characters, or reserved words are quoted automatically.
  • Empty mappings render as {} and empty arrays as [].
  • Flow style produces JSON-like single-line output, useful for inline values and tests.

How to use

  1. Paste your JSON document into the input on the left, or click Load sample to start with an example.
  2. Pick a style: Block for multi-line config-style output, or Flow for a JSON-like single-line form.
  3. Pick an indent (2 or 4 spaces) and a string quote preference (Auto, Single, or Double).
  4. Read the YAML output on the right with line, key, and byte counts at the top.
  5. Click Copy YAML to copy the result, or Download .yaml to save it as a file.

About this tool

JSON to YAML Converter rewrites any valid JSON document as YAML 1.2 compatible output, entirely in your browser. Paste JSON, pick the indent and style, and the YAML appears instantly on the right with copy and download buttons. The converter understands every JSON value type and maps it to the cleanest YAML form: null, true, and false render as their YAML keywords, finite numbers render in their native form, NaN and Infinity render as .nan, .inf, and -.inf, and strings get a smart quote-style decision so the round trip preserves their type. Strings that look like numbers, booleans, or null (true, false, null, yes, no, on, off, ~, 1.5, 3e2, and the like) are quoted automatically so a YAML parser does not coerce them back into a different type. Strings containing colons, hashes, leading or trailing whitespace, or YAML flow indicators are also quoted. Multi-line strings render as a YAML literal block scalar (the | indicator with the right chomp marker) so newlines are preserved exactly the way the JSON source had them, with no folding surprises. Block style produces the multi-line, nested form that real configuration files use, with each key on its own line and arrays rendered as dash lists. Flow style produces a single line of JSON-like YAML, useful for tests, fixtures, and inline values where readability matters less than compactness. Indent is configurable to 2 or 4 spaces to match the project style guide, and the quoting choice (auto, single, or double) lets you align output with whichever convention your existing files use. Empty mappings render as {}, empty arrays render as [], and object keys with spaces, special characters, or reserved words are quoted automatically using the same rules as values. The output panel reports line count, total key count across the whole document, and the byte size of the result, so you can sanity check large conversions at a glance. Useful for translating JSON API responses into YAML config files, converting package.json or tsconfig.json snippets into ansible variables, dropping JSON fixtures into Helm chart values, prepping OpenAPI or Swagger documents for an editor that prefers YAML, generating Kubernetes manifests from a JSON template, building GitHub Actions or CircleCI workflows from a JSON spec, and any place where you live in JSON but ship in YAML. Conversion runs entirely on your device, so the configs, secrets, fixture data, and infrastructure manifests pasted here never leave your browser.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsConverter Tools