Skip to main content

YAML Viewer

Paste YAML and view it as clean, canonically re-indented YAML alongside an equivalent JSON preview — a quick way to see a config file's actual data shape. Runs entirely in your browser.

Input

Output

Formatted YAML
 
JSON Preview
 
Was this helpful?

Guides

The YAML Viewer parses pasted YAML and shows you its actual data shape two ways: a cleanly re-indented, canonical YAML block, and an equivalent JSON preview. It's the fastest way to answer "what does this config actually contain" — especially when the source file mixes indentation styles, inline and block collections, or you just want to see the same data as JSON before writing code against it. Runs entirely in your browser; nothing you paste is uploaded.

How it works

The input is parsed with the yaml package into its underlying data value, then re-rendered two ways:

  • Formatted YAML — the parsed value re-printed with consistent 2-space indentation.
  • JSON Preview — the same parsed value as indented JSON.

Because both outputs come from the parsed value rather than the original source text, this is a viewer, not a lossless formatter: comments, original quote styles and block-scalar formatting are not preserved (an implicit type like 42 or true is shown as its normalized form, not its original spelling). If you need to preserve those instead, use the YAML Formatter, which round-trips through the parser's syntax tree rather than a plain value.

Multi-document YAML (files with --- separators) is supported — the JSON preview becomes an array of documents in order, and the formatted YAML re-joins each document with its own --- separator.

When something looks wrong

If the input has a syntax error, both output panels show the error with its exact line and column instead of silently producing garbage or an empty result — the same YAML parser also used by YAML Validator, which is a better fit if all you need is a pass/fail syntax check without a reformatted view.

Does this tool preserve comments?

No — since the view is built from the parsed value, comments (and the original formatting around them) are dropped. This is a deliberate trade-off for showing a document's true data shape; use YAML Formatter if comments matter to you.

Can I convert the other direction, JSON to YAML?

Yes — see JSON to YAML Converter.

yamlviewerjsonpreviewyaml to jsonconfigdeveloper

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.