JSON ↔ YAML Converter
Paste JSON or YAML, pick a direction, and get cleanly formatted output with types preserved. Errors point to the exact line and column. Nothing is uploaded or executed.
Convert
Strict JSON · safe YAMLComments and anchors in YAML are not kept after conversion. Custom YAML tags are rejected, never executed.
About JSON ↔ YAML Converter
JSON ↔ YAML Converter converts data between JSON and YAML in both directions. JSON is read by a strict parser and YAML by a safe loader using the YAML 1.2 core schema, so types such as strings, numbers, booleans and null are preserved. Errors show the exact line and column, and both sides can be copied or downloaded.
Configuration files, APIs and deployment tools often use different formats — for example JSON from an API and YAML for Kubernetes or Docker Compose. Converting by hand is slow and error-prone, especially with quoting and indentation. This tool converts reliably and explains exactly where a document is invalid.
Step by step
- Paste JSON into the JSON box or YAML into the YAML box, or press Load sample.
- Choose the indentation you want for the output.
- Press JSON → YAML or YAML → JSON.
- If an error appears, read the line and column and use Go to error to jump to it.
- Copy the result or download it as a .json or .yaml file.
What it offers
- Two-way conversion in separate editable panels
- Strict JSON parsing with line-and-column errors
- Safe YAML loading — custom tags are rejected, never executed
- Data types preserved, with ambiguous strings quoted in YAML
- Multiple YAML documents converted to a JSON array
- Indentation options for both formats
- Copy and Download for JSON and YAML
Tips for best results
- Validate the converted output in the tool that will use it.
- Keep comments in your original YAML file — JSON cannot store them.
- Quote values like yes, no, on and off in YAML if older tools read your files.
- Avoid numbers larger than 9,007,199,254,740,991; store them as strings instead.
- Use two-space indentation for YAML unless your project uses another style.
Why people use it
Both directions
One tool for JSON → YAML and YAML → JSON.
Exact errors
Line and column for every parse error.
Safe
Input is parsed as data and never executed.
Private
Conversion runs entirely in your browser.
Common questions
This runs entirely in your browser
No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.