Convert between YAML and JSON — both directions, pretty-printed, error messages with line numbers — browser-only
- Runs locally
- Category Format Converter
- Best for Turning pasted content or local files into a handoff-friendly format.
What this tool does
Free online YAML ⇄ JSON converter. Paste YAML and get JSON, or paste JSON and get YAML — both directions instant. Pretty-printed output with configurable indent. Surfaces parser errors with line numbers so you can fix invalid YAML in place. 100% client-side, your config never leaves the browser.
Tool details
- Input
- Text + Numbers + Structured content
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- No account required
- Open the page and use it; whether results survive refresh depends on the tool.
- Performance budget
- Initial JS <= 30 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Format Converter · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How YAML ⇄ JSON Converter fits into your work
Use it when the main problem is getting content from one practical format into another.
Conversion jobs
- Turning pasted content or local files into a handoff-friendly format.
- Previewing a conversion before you use it in a larger workflow.
- Cleaning small format mismatches without opening a full editor.
Conversion checks
- Try a small sample first when the source format is messy.
- Check character encoding, separators, and line endings after conversion.
- Keep the source until the converted output has been reviewed.
Good next steps
These links move the current task into a more complete workflow.
- 1 JSON Formatter & Validator Format, validate, and minify JSON instantly — right in your browser. Open
- 2 Markdown to HTML Convert Markdown to clean HTML — headings, lists, code, links, images, tables — instant live preview, browser-only Open
- 3 CSV ⇄ JSON Converter Convert CSV to JSON or JSON to CSV — handles quoted commas, newlines in cells, custom delimiter — browser-only Open
Real-world use cases
Pasting a Kubernetes manifest into a JSON-only API client
Your deployment lives as a 120-line YAML manifest, but the admission webhook you are testing only accepts JSON. Paste the YAML here, copy the JSON out, and fire it at the endpoint in Postman. The line-numbered error catches the stray tab on line 47 before kubectl ever sees it.
Reading a dense JSON config that a teammate sent
Someone drops a 200-key minified JSON blob in the channel and asks "is the timeout right?" Paste it, flip to YAML, and the nesting plus comments-free layout reads like prose. You spot `timeoutMs: 3000` three levels down in five seconds instead of squinting at one line.
Converting a docker-compose snippet for a Node script
You are scripting a migration and need the service block from docker-compose.yml as a plain JS object. Paste the YAML, get JSON, drop it straight into your `.ts` file as a literal. Anchors and the `<<:` merge keys flatten out, so the object is already resolved.
Sanity-checking GitHub Actions YAML indentation
A workflow keeps failing with "did not find expected key". Paste the .github/workflows/ci.yml here; if it is valid YAML you get JSON back instantly, if not you get the exact line. Two spaces vs four under `jobs:` is the usual culprit, and the error points right at it.
Common pitfalls
Indenting YAML with tabs. The parser rejects them per spec, so a config copied from an editor that auto-inserts tabs fails on line 1. Convert tabs to spaces first, or set your editor to soft tabs.
Expecting `yes`, `no`, `on`, `off` to become booleans. Under YAML 1.2 they stay strings. If you want a real boolean, write `true`/`false`, otherwise your JSON gets `"yes"` not `true`.
Assuming comments survive the round-trip. JSON has no comment syntax, so every `# note` line is dropped when you convert YAML to JSON. Move anything important into an actual key before converting.
Privacy
Conversion runs entirely in your browser using the eemeli/yaml library. Whatever you paste, whether a Kubernetes secret manifest or a config with tokens, is parsed in the tab and never sent to any server. This tool does not write your YAML or JSON into the URL, so nothing sensitive ends up in browser history, share links, or referrer headers. Close the tab and it is gone.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only