Convert JSON to YAML
Paste JSON and get tidy, human-friendly YAML you can drop into a config, a CI pipeline or a Kubernetes manifest. It runs in your browser, so your settings stay private.
- No daily cap
- Runs in your browser
- 2 or 4 space indent
- No line wrapping
- Runs on your device. Files are never uploaded.
- Free and unlimited. No sign-up, no watermark.
JSON to YAML in three steps
No account, no email, no waiting for an upload.
- STEP 01
Add your JSON
Use the box, or open a .json, .geojson or .txt file.
- STEP 02
Pick an indent
Choose 2 or 4 spaces. YAML cannot be indented with tabs, so choosing Tabs falls back to 2 spaces.
- STEP 03
Copy or download the YAML
Save it as a .yaml file or copy it into your editor.
What JSON to YAML does, and what it doesn't
We'd rather tell you up front than surprise you after the download.
What you get
- Readable block styleObjects become key: value lines and lists become dash items, without braces or brackets.
- Long lines are not foldedLong strings stay on one line instead of being wrapped, so values copy exactly.
- Safe quotingStrings that could be read as numbers or booleans, such as 'true' or '123', are quoted so they stay text.
- No anchors or aliasesRepeated data is written out in full, which is easier to read and edit.
- Errors show whereInvalid JSON stops with its line and column.
Good to know
- JSON has no commentsNothing is lost, but there are no comments to add. Write them yourself afterwards.
- Big integersIntegers beyond 2^53 are read by the browser and may be rounded.
- Check before you deployAlways validate the result with the YAML validator, especially for manifests where indentation matters.
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 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
The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.
When people use JSON to YAML
Write Kubernetes or Compose files
Draft in JSON from an API, then convert to YAML for your repo.
Move between config formats
Take a JSON config to a tool that prefers YAML.
Read a payload more easily
YAML shows the same data with less punctuation.
Teach the two formats
Show learners the same data side by side.
Mediaextractr vs typical upload tools
| MediaextractrPrivate | Typical upload tools | |
|---|---|---|
| Your file is uploaded | Never | Yes |
| Sign-up needed | No | Often, after a few files |
| Daily file limit | None | Often 1–2 free files |
| Watermark | Never | Sometimes |
| Wait for upload & download | No | Yes |
| Speed on very large files | Depends on your device | Depends on their servers |
How JSON maps to YAML
YAML is a superset of JSON in spirit: both describe objects, lists, strings, numbers, booleans and null. In YAML the structure comes from indentation instead of braces. {"a": [1, 2]} becomes a: followed by two lines starting with a dash.
Because the data model is the same, converting does not change the meaning. It changes only how the data is written.
Things to watch in YAML
YAML is picky in ways JSON is not:
- Indentation must use spaces, and it must be consistent.
- Plain text that looks like a number, boolean or null can be read as that type, which is why the tool quotes such strings.
- Special characters at the start of a value, such as # or @, need quotes. They are added for you.
- Go back with YAML to JSON, or tidy a file with the YAML formatter.
Using the YAML in practice
For Kubernetes, Compose or CI files, convert, then read the result once for indentation and quoting before committing. Add comments where they help the next person, and run the file through the YAML validator. Conversions from JSON are a good way to start a manifest, but tools usually need extra fields that you add by hand.
Questions, answered
How do I convert JSON to YAML?
Paste the JSON, pick an indent and copy the YAML.
Does my config leave the browser when converted?
No. The YAML is produced by script in this page, so hostnames and secrets in your JSON are not uploaded.
Will the YAML mean the same as my JSON?
Yes. Objects, lists, strings, numbers, booleans and null are all kept. Ambiguous strings are quoted so they are not misread.
Are comments supported?
JSON has no comments, so none are produced. You can add them to the YAML after converting.
Can I convert YAML back?
Yes, with YAML to JSON.
Can I convert JSON to YAML on a tablet?
Yes. It runs in current tablet and phone browsers, and the YAML keeps its indentation when copied.