tool hub Tool Hub

JSON to YAML

JSON to YAML — runs in your browser. Inputs are not stored.

Runs in your browser No sign-up Free to use


JSON → YAML

Converts objects, arrays, strings, numbers, booleans, and null to simple YAML with no external library.

How to use

  1. Choose indent spaces from 1 to 8. The default is 2 spaces.
  2. Paste a document that mixes objects and arrays into the JSON field.
  3. Click Convert and check the result in the YAML field below.
  4. Use Copy result when you want to drop it into a config file.
  5. Click Reset to start over.

Key concepts

JSON–YAML conversion is often used to show Kubernetes or CI configs and frontend env examples as YAML. This page converts only objects, arrays, strings, numbers, booleans, and null into simple YAML, with no external library. It does not produce advanced YAML such as anchors, tags, or multiline blocks. Conversion happens only in the browser.

Strings that contain special characters or colons are quoted so they do not break. Indentation is controlled only by the number of spaces; tabs are not used. If the JSON is invalid, conversion fails, so it is best to fix the syntax first with a JSON formatter. Arrays become hyphen lists, and objects become key-colon-value lines.

Example

Input {"name":"tvinghub","tags":["a","b"],"ok":true} with indent 2 becomes name: tvinghub, tags: followed by - a - b, and ok: true. Empty strings or values with colons may be quoted. If you need comments like a Kubernetes manifest, you have to add them yourself after conversion. If the indent count does not match your repo rules, the only difference may show up in review. Even a long one-line JSON converts as long as the object structure is valid, so fix the brackets with a formatter first. If you try the same input more than once, reset and paste again so it does not mix with the previous output. On a shared computer, clear the fields when you finish so the original text is not left on the screen. Closing the browser tab also clears what you just pasted; you do not need to send a delete request to a server. Button names and field labels match the tool at the top of the page, so you can follow this guide as you go. If the result is empty, check that required fields are filled and that an error message is not hidden. This article is a how-to; it does not mean your input is stored in an external repository. On mobile, the copy button may ask for clipboard permission — allow it, then tap again.

Related: YAML → JSON · JSON formatter · JSON → CSV

Frequently asked questions

Is JSON-to-YAML conversion a complete YAML spec?

No. It is simple YAML for everyday config and API examples. It does not create anchors or tags.

How many indent spaces work best?

Many projects use 2. If your repo uses 4, set the count to 4. The maximum is 8.

How is null written when converting JSON to YAML?

It is written as YAML null. Empty objects and empty arrays are also supported.

Does conversion happen on the server?

No. Conversion runs only in the browser.

Does JSON with comments work?

Standard JSON has no comments. Remove the comments, then convert.

Do multiline strings become YAML blocks?

No. They are quoted as ordinary strings. Pipe blocks are not created.

JSON to YAML cover image
Your input is not sent to the server and disappears when you close the page.

Last reviewed: 2026-09-04