YAML → JSON
Turn YAML configs into clean JSON — without leaving your browser.
Your data is processed entirely in your browser and is never uploaded.
Tool workspace
Drag & drop file here or browse
Options
Convert YAML in three steps
Paste or drop
Any .yaml / .yml config — validity reads as you type, up to 15M characters.
Convert
Press Convert (or Ctrl/⌘ + Enter). Big files run in a background worker.
Take the JSON
Copy or download pretty-printed JSON — 2-space, 4-space, or tabs.
What the conversion does (and gives up)
YAML is a superset of JSON — every JSON document is already (nearly) valid YAML, so the conversion is one-directional by nature. The engine parses your YAML 1.2 and re-serializes the result as pretty-printed JSON. Three things change in the crossing: comments are dropped because JSON has nowhere to keep them; anchors and aliases are resolved to their expanded values; and YAML timestamps become ISO-8601 strings, since JSON has no date type. One thing deliberately does not happen: duplicate keys are rejected with an exact line and column instead of being silently collapsed — JSON output would keep only the last value, and we'd rather point at the problem than drop your data. Large files convert in a background worker so the editor never locks up.
Things to know
Bad indentation
YAML structure lives in its whitespace. A line that sits one space too deep (or too shallow) breaks the parse — and tabs are forbidden for indentation entirely. Load this and the caret lands on the offending line.
user: name: Ada role: engineer
Unclosed flow mapping
Inline { } and [ ] collections must be closed. When one isn't, the parser runs out of input mid-collection and reports it at the end of the text.
user: { name: AdaDuplicate keys
The converter refuses to silently keep only the last value. Fix the duplicate (or decide which one is real) and convert again.
name: Ada name: Alan
Comments disappear
JSON has no comment syntax, so every # comment is dropped on conversion. If a comment carries real information, move it into a data field before converting.
Dates become ISO strings
A bare YAML date converts to an ISO-8601 string in JSON. Load this and convert — the output carries the full timestamp as text.
shipped: 2026-08-02
Try these
name: Ada role: engineer level: 7 active: true alias: null
Scalars of every type — string, number, boolean, null.
toolkit:
name: Free JSON Toolkit
tools:
- yaml-to-json
- json-formatter
limits:
uploads: 0Block sequences become JSON arrays; nesting becomes objects.
base: &base retries: 3 timeout: 30 production: settings: *base host: api.example.com
&base defines an anchor; *base expands it — the JSON contains the full value.
pair this withReverse it → JSON → YAML·Format the result → JSON Formatter·Validate the result → JSON Validator
Frequently asked questions
Is my YAML uploaded anywhere?
No. Parsing runs entirely in your browser (in a background worker for large files). Your config never leaves your machine.
Why does my file fail on tabs?
YAML forbids tab characters for indentation — spaces only. The error points to the exact line; replace the tabs with spaces and convert again.
What happens to duplicate keys?
They fail the conversion with an exact line and column, on purpose. JSON output would have to silently keep only the last value — we'd rather point at the problem than drop your data without telling you.
What about comments, dates, and anchors?
Comments are dropped (JSON has nowhere to keep them), YAML timestamps become ISO-8601 strings (JSON has no date type), and anchors / aliases (&id /*id) are resolved to their expanded values.
Which YAML version is supported?
YAML 1.2 with the core schema — the modern spec, and the same parser the JSON → YAML tool uses, so a round trip stays consistent in both directions.