---
title: "JSON to YAML and YAML to JSON Converter (Free)"
description: "JSON to YAML and YAML to JSON converter. Anchors, merge keys and multi-document files work; anything JSON cannot hold is listed by line. No upload."
canonical: "https://browser-use.com/tools/json-to-yaml"
last_updated: "2026-11-12"
---

# JSON to YAML and YAML to JSON Converter (Free)

## JSON to YAML Converter

Convert JSON to YAML and YAML to JSON in your browser. Big integers stay exact, and dates and key order stay as written. Copy or download the result.

## How it works

### Pick a direction

JSON to YAML or YAML to JSON. Swap sends the result back as input.

### Paste or open a file

Paste, open a file up to 5 MB, or drop one on the box. It is read in this tab and never uploaded.

### Copy or download

Check the notes for anything that changed, then copy or download the result.

### Why are "NO" and "yes" quoted?

YAML 1.1 reads yes, no, on and off as booleans, 012 as octal, 1:30 as a number and 2026-11-12 as a date, and PyYAML does too. The 1.1 spec also lists y and n as booleans. YAML 1.2 reads the words, 1:30 and the date as text, and 012 as 12. Strings like these get quotes, so both read them back as text. "Read as YAML 1.1" applies the 1.1 rules when converting YAML to JSON; dates stay text either way.

Source: [YAML 1.1 booleans](https://yaml.org/type/bool.html) · [integers](https://yaml.org/type/int.html) · [timestamps](https://yaml.org/type/timestamp.html) · [YAML 1.2.2 core schema](https://yaml.org/spec/1.2.2/#103-core-schema) · [PyYAML](https://pypi.org/project/PyYAML/)

### What can JSON not hold?

Anchors and aliases: each alias is written out in full. .inf and .nan: JSON has no such numbers, so they become null. Tags like !Ref: dropped, the value kept. Null, list and map keys: written as text. Each of these is listed with its line. Comments are dropped.

Source: [RFC 8259 §6 Numbers](https://www.rfc-editor.org/rfc/rfc8259.html#section-6) · [YAML anchors and aliases](https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases)

### Are big numbers kept?

Yes: 12345678901234567890 stays 12345678901234567890 both ways, and 1.10 stays 1.10. JavaScript's JSON.parse rounds integers past 2^53 - 1. Other forms, like 0x1F in YAML or 1e5 in JSON, keep their value and are listed in the notes. Key order is kept too, including keys like "10" that a JavaScript object would move first.

Source: [RFC 8259 §6 Numbers](https://www.rfc-editor.org/rfc/rfc8259.html#section-6)

### What about several YAML documents?

A file with --- between documents becomes a JSON array, one item per document; empty documents are skipped. Back the other way, "Array as YAML documents" writes each item of a top-level array as its own document.

Source: [YAML 1.2.2 streams](https://yaml.org/spec/1.2.2/#92-streams)

### Why is my YAML rejected?

The usual causes: a tab used for indentation (YAML indents with spaces), the same key twice in one mapping, or a line indented differently from its siblings. The error shows the line and column. JSON is checked strictly: no comments, no trailing commas, keys in double quotes.

Source: [YAML indentation](https://yaml.org/spec/1.2.2/#61-indentation-spaces) · [unique keys](https://yaml.org/spec/1.2.2/#uniqueness) · [RFC 8259](https://www.rfc-editor.org/rfc/rfc8259.html)

## Need data from a website, not a file?

Browser Use agents open pages in a real browser, including dynamic ones, and return structured data.

[See AI web scraping](https://browser-use.com/web-scraping)

Converted to YAML, 1 note

Direction

JSON to YAMLYAML to JSON

Swap

JSON{ "service": "checkout", "region": "NO", "debug": "off", "version": "1.10", "replicas": 3, "orderSeq": 9007199254740993, "ports": \[80, 443\], "env": { "LOG\_LEVEL": "info", "TIMEOUT": "30" }, "notes": "Deploys at 09:00.\\nRolls back on error.\\n" }

Load exampleOpen file

Runs in your browser. Your JSON is never uploaded.

272 B

Indent

2 spaces4 spaces

Array as YAML documents

Each item of a top-level array becomes its own document, split by ---.

Strings that [YAML 1.1](https://yaml.org/type/bool.html) reads as something else (yes, no, on, 012, 1:30, 2026-11-12) get quotes. Number values are kept.

## YAML · 212 B

Copy YAMLDownload

1 note

-   Line 7: 9007199254740993 is kept exactly. JavaScript's JSON.parse reads it as 9007199254740992.

service: checkout
region: "NO"
debug: "off"
version: "1.10"
replicas: 3
orderSeq: 9007199254740993
ports:
  - 80
  - 443
env:
  LOG\_LEVEL: info
  TIMEOUT: "30"
notes: |
  Deploys at 09:00.
  Rolls back on error.

---

BROWSER USE

- Browser Use Agents: give Browser Use a task and receive completed work. API V4 is current for new integrations.
- Browser Infrastructure: connect your agent or automation to managed browsers through SDK, REST, or CDP. Starts at $0.02/browser-hour.
- Developer tools: Open Source, Browser Harness, SDK, and MCP support the two products above.

[Developer Index](https://browser-use.com/index.md)
[Product Map](https://browser-use.com/llms.txt)
[Full Product Context](https://browser-use.com/llms-full.txt)
[Pricing](https://browser-use.com/pricing.md)
[Cloud Docs](https://docs.browser-use.com/cloud/quickstart)
[Open Source Docs](https://docs.browser-use.com/open-source/introduction)
