Data and JSON tools Free · No sign-up · No upload

Convert YAML to JSON

Turn a YAML file into clean JSON in a click. Anchors are resolved, several documents become a list, and mistakes are pinpointed. Your config never leaves your browser.

  • Free, every time
  • No cloud processing
  • Multi-document support
  • Anchors resolved
Your data
  • Runs on your device. Files are never uploaded.
  • Free and unlimited. No sign-up, no watermark.
Private: processed in your browserNo upload waitIN: YAML → OUT: JSON
How was YAML to JSON?
How it works

YAML to JSON in three steps

No account, no email, no waiting for an upload.

  1. STEP 01

    Paste or open your YAML

    Use a .yaml, .yml or .txt file, or paste into the box.

  2. STEP 02

    Choose the indent

    Pick 2 spaces, 4 spaces or tabs for the JSON output.

  3. STEP 03

    Copy or download the JSON

    If the YAML has a syntax error, you see its line and column instead.

What you get

What YAML to JSON does, and what it doesn't

We'd rather tell you up front than surprise you after the download.

What you get

  • Several documentsA file with --- separators becomes a JSON list, one item per document, and the note says how many.
  • Anchors, aliases and mergesValues defined once with & and reused with * are written out in full in the JSON.
  • Errors with a positionBad indentation, tabs or duplicate keys are reported with the line and column.
  • Dates become textTimestamps are written as ISO 8601 strings, which JSON can hold.
  • Pretty outputThe result is indented, ready for an API request or a fixture.

Good to know

  • Comments disappearJSON cannot hold them, so any comments in the YAML are dropped.
  • Custom tagsApplication-specific tags that the parser does not know cause an error. Remove them or write plain values.
  • Check the resultIf a value came out as a different type than you expected, see the quoting tips in the guide below.
Private by design

Your data never leave your device

The tool runs inside your browser instead of on our servers, so there is nothing to upload, store or delete afterwards.

Typical online tool upload

Your device→Their server→Your device

Your file travels over the internet, sits on someone else's computer for a while, and you wait for the upload and the download.

Mediaextractr no upload

Your device does all the work

The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.

Made for real work

When people use YAML to JSON

Test an API with a YAML example

Many docs show request bodies in YAML. Convert to JSON to send them.

Inspect a Kubernetes or CI file

See the exact data structure a YAML manifest produces.

Feed a JSON-only tool

Use YAML as the source, JSON as the delivery format.

Verify anchors

Confirm what a merge key actually expands to.

Compare

Mediaextractr vs typical upload tools

MediaextractrPrivateTypical upload tools
Your file is uploadedNeverYes
Sign-up neededNoOften, after a few files
Daily file limitNoneOften 1–2 free files
WatermarkNeverSometimes
Wait for upload & downloadNoYes
Speed on very large filesDepends on your deviceDepends on their servers

What the converter understands

It reads the usual YAML features: nested maps and lists, multi-line strings, flow style like [a, b] and {x: 1}, quoted strings and the true, false and null words. Anchors and aliases are expanded, so JSON shows the final values.

If your file has several documents, you get a JSON array. A single document becomes a single JSON value.

Surprises worth knowing

YAML guesses types from plain text. That is convenient but can surprise you:

  • Words such as yes and no are plain text in YAML 1.2, but some older YAML 1.1 parsers read them as booleans.
  • A value like 0x1F can be read as a hexadecimal number. Quote it to keep it as text.
  • A colon followed by a space inside an unquoted string starts a new key.
  • Run YAML validator to see the structure, or tidy with the YAML formatter.

Using the JSON afterwards

Once converted, you can validate the data with the JSON schema validator, query it with the JSON path tester, or send it to an API. If the structure is not what you expected, the mismatch usually comes from indentation in the YAML, which a quick look at the JSON makes obvious.

FAQ

Questions, answered

How do I convert YAML to JSON?

Paste the YAML and copy the JSON. Several documents become a JSON list.

Does it keep my YAML anchors?

Anchors and aliases are resolved, so the JSON shows the full data in each place. JSON has no equivalent.

Is a YAML file with credentials safe to convert here?

Yes. It is parsed by code in this tab and is never transmitted, so keys and passwords in it stay local.

What happens to comments?

They are dropped, since JSON has no comments.

How do I find a YAML error?

The message gives the line and column and a short reason, such as bad indentation.

Will it run on my iPhone or Android phone?

Yes, on current Safari and Chrome for iOS and Android. A pasted YAML file keeps its indentation.