Free YAML to JSON — no upload, no account

Convert YAML to JSON
Anchors, multi-doc,
all types supported.

Free YAML to JSON converter. Handles anchors, aliases, multi-document files and all YAML scalar types. Powered by js-yaml. Runs entirely in your browser — your data never leaves your device.

Your data never leaves your browser
Multi-document YAML (---)
Anchors & aliases resolved
YAML dates → ISO 8601
Always free
YAML to JSON Converter   100% client-side
Conversion uses js-yaml — the most widely used JavaScript YAML parser with 150M+ weekly npm downloads. No data is uploaded.
YAML input
  JSON ready

      
How to convert YAML to JSON

Three steps — paste your YAML and get valid JSON in seconds.

1
Paste or upload your YAML

Paste YAML text directly or upload a .yaml or .yml file. js-yaml parses the full YAML 1.2 spec — including anchors, aliases, multi-document files, block and flow syntax, and all scalar types.

2
Choose output options

For multi-document YAML files (separated by ---), choose whether to output only the first document or wrap all documents in a JSON array. Toggle between pretty-printed and minified output.

3
Copy or download the JSON

Click Convert and copy the JSON to clipboard or download a .json file. The output is valid JSON ready for any API, database, JavaScript application or data pipeline.

YAML vs JSON — key differences

Why YAML and JSON represent the same data differently.

YAML and JSON are both data serialisation formats, but designed for different audiences. YAML is optimised for human readability — it uses indentation instead of braces and brackets, supports comments, and has a richer type system including dates and binary. It is the standard format for configuration files (Docker Compose, Kubernetes, GitHub Actions, Ansible).

JSON is optimised for machine consumption — it is a strict subset of JavaScript object syntax, universally supported by APIs, databases and programming languages without any additional parser. Every JSON document is valid YAML, but not every YAML document is valid JSON.

The main conversion challenges are YAML-only features that have no JSON equivalent: comments (discarded), anchors and aliases (resolved to their values), multi-document files (each document becomes a separate JSON object), and YAML dates (converted to ISO 8601 strings since JSON has no date type).

When do you need YAML to JSON?

Common workflows where JSON output is required from YAML input.

Kubernetes and Docker

Kubernetes manifests and Docker Compose files are YAML. Converting to JSON lets you use them with tools that expect JSON input — kubectl supports JSON, and some CI/CD platforms and policy engines (like OPA/Rego) work natively with JSON.

Config file migration

Many applications accept both YAML and JSON config. Converting your YAML config to JSON is useful when migrating to a stack that prefers JSON, when generating config programmatically, or when validating config against a JSON Schema.

API and pipeline input

REST APIs, GraphQL variables and most data pipelines accept JSON but not YAML. Converting a YAML data file to JSON lets you pass it directly as an API request body or pipeline input without a server-side YAML parser dependency.

Python and data tools

While Python's PyYAML can read YAML natively, converting to JSON first is useful for sharing data with tools that don't have a YAML dependency, for debugging YAML parsing issues, or for loading into pandas with pd.read_json().

Conversion options explained

What each setting controls in the JSON output.

OptionValuesWhat it does
Multi-document First only · All as array YAML files can contain multiple documents separated by ---. First only outputs the first document as a JSON object — the most common case. All as array wraps every document in a JSON array — useful when you need to process all documents programmatically.
Formatting Pretty · Minified Pretty formats the output with 2-space indentation — human-readable for inspection, documentation and debugging. Minified removes all whitespace — smallest possible payload for API transmission or storage.
Related JSON tools

Other free converters you might need next.

Popular searches
yaml to json converter convert yaml to json online yaml to json free yml to json converter yaml to json python convert yaml file to json yaml to json javascript kubernetes yaml to json docker compose yaml to json yaml to json online free yaml converter to json yml to json online yaml to json multi document

YAML parsed in
your browser. No upload.

JSONshift uses js-yaml — the most widely deployed JavaScript YAML parser with 150 million weekly npm downloads, used in ESLint, Webpack, Prettier and thousands of other tools — to parse YAML entirely in your browser. Your data is never transmitted to any server.

The output is valid JSON — anchors resolved, aliases expanded, dates converted to ISO 8601 strings, and comments discarded. The result passes JSON.parse() without errors and works with any JSON consumer.

Powered by js-yaml
150M+ weekly npm downloads. Used by ESLint, Webpack and Prettier. The industry standard for JavaScript YAML parsing.
Full YAML 1.2 support
Anchors, aliases, multi-document files, block and flow syntax, all scalar types — everything js-yaml supports.
Valid JSON output
YAML-only features are mapped correctly: dates become ISO 8601 strings, anchors are resolved, comments are discarded.
47 tools, always free
No file size limits, no watermarks, no account. Funded by non-intrusive display advertising only.
Frequently asked questions
Common questions about converting YAML to JSON online.
How do I convert YAML to JSON?
Paste your YAML or upload a .yaml file into the converter above, choose your output options, then click Convert. Copy or download the JSON output instantly. The conversion uses js-yaml running entirely in your browser — no upload required.
Does the converter support multi-document YAML files?
Yes. YAML files with multiple documents separated by --- are supported. Choose "First document only" to output the first document as a JSON object, or "All documents as array" to wrap every document in a JSON array for programmatic processing.
How are YAML anchors and aliases handled?
js-yaml resolves YAML anchors (&anchor) and aliases (*alias) automatically before converting to JSON. The output contains the fully resolved values — no anchor or alias syntax appears in the JSON output.
How are YAML dates converted to JSON?
YAML has a native date type (e.g. 2024-03-15) which JSON does not support. js-yaml converts YAML dates to JavaScript Date objects, which are then serialized to ISO 8601 strings in the JSON output — e.g. "2024-03-15T00:00:00.000Z".
Is my YAML data safe when using this converter?
Yes. js-yaml runs entirely in your browser. Your YAML is never uploaded to any server. Open the Network inspector during conversion — you will see zero outbound data requests (except the one-time js-yaml CDN load on first use).
Is the YAML to JSON converter free?
Yes, completely free. No file size limits, no account required. JSONshift is funded by non-intrusive display advertising.
Go up