All free tools

YAML to JSON converter (and JSON to YAML)

Paste YAML to get JSON, or JSON to get YAML. Errors point to the exact line and column, so you can fix a broken config file quickly.

Runs in your browser. Your YAML and JSON stay on your device and are never uploaded to EpiFive.

Convert
Indent

Guides that use this tool

How to use it

  1. Choose YAML to JSON or JSON to YAML.
  2. Paste your text. The converted result appears as you type; switching direction carries the result over.
  3. Pick 2 or 4 spaces of indentation, then copy or download the result.

Example

The YAML ports: [80, 443] with name: web on the next line becomes {"ports": [80, 443], "name": "web"} in JSON.

  • JSON formatter: Format, validate and minify JSON, with the line and column of any error.
  • CSV to JSON converter: Convert CSV to JSON and back: quoted fields, any delimiter, header row, typed values and nested columns.
  • Text diff checker: Compare two texts side by side or inline, with changed words highlighted and options to ignore whitespace and case.
  • Base64 encode and decode: Encode or decode Base64 text (UTF-8 safe) and convert files to and from Base64.
  • Cron expression generator: Build or explain a 5-field cron expression in plain English and see the next run times.

Questions people ask

What is the difference between YAML and JSON?

They describe the same data: objects, lists, text, numbers and true/false. JSON uses braces, brackets and quotes and is what APIs exchange. YAML uses indentation instead, allows comments and is easier to write by hand, which is why Kubernetes, Docker Compose and CI pipelines use it.

Why does my YAML give an error?

Most YAML errors are indentation: mixing tabs and spaces (YAML allows only spaces), or a list item indented differently from its siblings. The error shows the line and column. A colon followed by a space inside a value also needs the value in quotes.

What happens to YAML comments?

JSON has no comments, so they are dropped when converting to JSON and cannot come back when converting to YAML. Keep your original YAML file if the comments matter.

Can it convert a file with several YAML documents?

Yes. Documents separated by --- (as in many Kubernetes manifests) become one JSON array with one item per document.

Why did yes or a date change?

YAML 1.2 treats only true and false as booleans, so yes and no stay text. Unquoted dates such as 2025-01-31 are read as dates and written to JSON as full timestamps. Put a value in quotes to keep it exactly as written.

Is my configuration uploaded?

No. Conversion runs in your browser with the open-source js-yaml library, so files with hostnames or settings never leave your device or reach EpiFive.