Code & Data
Convert JSON to YAML
Paste JSON and get YAML — block style, two-space indents, and quoting applied only where a bare word would change type on the way back.
Paste valid JSON above and the result appears here.
- Runs in your browser
- No account required
- Free to use
How it works
The quoting is the whole difficulty
YAML reads bare words as types. A string "yes" comes back as a boolean, "1.5" as a number, and "null" as nothing at all. So any string that looks like another type is quoted, and anything else is left bare — which is what makes the output both readable and lossless.
Block style throughout
Nested maps and sequences rather than inline braces. It is the form people write YAML in, and the form that stays readable as a config file grows.
Writing YAML is much easier than reading it
A YAML parser has to accept a dozen ways of expressing the same thing. A writer picks one and uses it consistently, which is why this direction can be done properly in a small amount of code and the reverse cannot.
What it does
Type-safe quoting
Strings that would read back as booleans, numbers or null are quoted. Ordinary words are not, so the result does not look like it was generated by a machine.
Empty containers stay explicit
An empty object becomes `{}` and an empty array `[]`, rather than vanishing into a key with nothing after it.
Key sorting
Optional, applied recursively — useful when the YAML is going into version control and you want a stable diff.
Your data never leaves the page
API responses, config files and exports are exactly the sort of thing that should not be pasted into someone else’s server. Parsing happens in your browser and what you paste is never transmitted — there is no code here that could send it anywhere, even by accident.
Practical advice
Getting a better result
- YAML is whitespace-significant. If you edit the result, keep the two-space indentation consistent or it will not parse.
- The Norway problem is real: unquoted `no` is a boolean in YAML 1.1, which is why country codes and similar values are quoted here.
- For Kubernetes and CI config, block style is what every example uses and what reviewers expect.
Questions
Things people ask
Why are some of my strings quoted and others not?
Because a bare word in YAML is typed by what it looks like. "yes", "true", "null" and "1.5" would all be read back as something other than a string, so they are quoted. Ordinary words cannot be mistaken for anything else and are left bare.
Does it convert YAML back to JSON?
Not yet. Parsing YAML properly is a substantially harder problem than writing it — the specification allows many forms for the same data — and a half-implemented parser that quietly mis-reads a config file is worse than none.
Related tools
JSON Formatter
Format and minify JSON, with errors that name the line.
Runs entirely in your browser
Open toolJSON Validator
Check JSON and get the line, column and cause of any error.
Runs entirely in your browser
Open toolJSON Viewer
Explore JSON as a collapsible tree instead of scrolling it.
Runs entirely in your browser
Open toolJSON to CSV
Turn an array of objects into a spreadsheet-ready CSV.
Runs entirely in your browser
Open toolWho builds these
Free tools by day. Websites that earn their keep by trade.
KuConvert is built by KUDUY, a web design and development agency. From custom WordPress builds to SEO and e-commerce, everything they do is engineered to bring you more qualified traffic and turn it into revenue.
Web Design
Custom, conversion-focused web design that captivates visitors and turns them into paying customers. Mobile-first, fast, and built to rank.
Web Development
Custom WordPress websites built with clean code, blazing-fast performance (Core Web Vitals optimised), and enterprise-grade security.
E-Commerce
Online stores that convert visitors to customers with seamless shopping experiences.
SEO
Technical SEO, keyword research, on-page optimisation and local SEO strategies that drive qualified organic traffic.
Digital Marketing
Data-driven campaigns that deliver measurable ROI across every channel.
Branding
Memorable brand identities that stand out in any market and build lasting trust.
Website Help
One-on-one expert support for bug fixes, updates and ongoing maintenance — without a long-term retainer.
Fixed scope, no surprise invoices
Most sites ship in four to eight weeks with the scope and the price agreed up front.
SEO from day one
Search is designed into the build — structure, schema and Core Web Vitals — not retrofitted.
A team, not a ticket queue
A project manager, a designer and a developer you can actually reach.
Need your whole site to load this fast?
Images are usually the heaviest thing on a page and the easiest win. KUDUY works on site speed, image delivery and Core Web Vitals for teams who would rather not do it by hand.
This tool runs entirely in your browser. Your files are never uploaded.