JSON to YAML
Convert JSON to YAML and back, with types and large numbers kept intact.
Runs fully in your browser. Nothing you paste here is sent anywhere.PrivateJSON
YAML
About this tool
Paste JSON and read it as clean block-style YAML while you type — the format of Kubernetes manifests, Docker Compose files, GitHub Actions workflows and Helm values — or flip the direction and turn YAML into JSON. Objects inside lists start on the dash line, multi-line strings become readable | blocks, and a stream of JSON values such as an NDJSON log becomes one YAML document per value, separated by ---.
Types survive the trip in both directions. A JSON string that a YAML reader would take for something else — "true", "8080", "02108", "1.10", "on", "no" — is quoted, so it comes back as the same string from a YAML 1.1 reader or a 1.2 one. Reading YAML, plain values are resolved with the YAML 1.2 core schema current parsers use, quoted values always stay strings, and anchors, aliases and << merge keys are expanded. Number literals are copied as written, so a 20-digit ID never loses a digit.
Errors are reported by line and column with the offending text underlined, and the last good result stays visible underneath. The JSON side accepts what hand-written and logged JSON arrives with — comments, trailing commas, single quotes, unquoted keys, a payload escaped inside a string — and flags each relaxation below the input, along with any key declared twice.
Nothing you paste is transmitted. The page is static HTML and both parsers run in your tab, so manifests with secrets, internal hostnames or customer data are safe to convert here.
Frequently asked questions
Is my JSON or YAML uploaded anywhere?
No. The conversion is plain JavaScript running in your browser, and there is no server endpoint to send it to. You can disconnect from the network after the page loads and it keeps working, which makes it safe for Kubernetes secrets and config files with credentials.
Why are some strings quoted in the YAML?
Because YAML decides a value’s type from how it looks. Written bare, "8080" would come back as a number, "1.10" as the number 1.1, and "on" or "no" as booleans in the YAML 1.1 readers many tools still use. Any string that would change type, or that contains YAML syntax such as ": " or " #", is quoted — with single or double quotes, as you choose in the toolbar. Everything else stays bare, so the output reads like a hand-written file.
How are multi-line strings written?
As literal blocks introduced with |, which keep every line break: | when the string ends in a newline and |- when it does not. A string a block cannot reproduce exactly — one whose first line starts with a space, one with lines of only spaces or several trailing newlines, or one with carriage returns or other control characters — is written double-quoted with escapes instead.
How does YAML to JSON treat yes, no, dates and several documents?
It follows YAML 1.2, the version current parsers default to: only true and false are booleans, so yes, no, on and off stay strings, and a date such as 2026-10-03 stays a string, since JSON has no date type. Hexadecimal and octal numbers such as 0x1F and 0o17 become decimal, and .inf and .nan become null because JSON cannot represent them. A file with several documents becomes a JSON array with one element per document.
What is not supported?
Comments, since JSON has no place for them: they are dropped going from YAML to JSON. Complex keys written with "?" are rejected, and custom tags other than !!str are read past. JSON to YAML never creates anchors, so a section repeated in the JSON is written out in full each time.
Is it really free?
Yes, with no account and no usage limit. The site is funded by ads placed around the tool, never inside your working area.