JSON to YAML

Convert JSON into clean YAML for config files. Free, in your browser.

Converts JSON to YAML in your browser — handy for config files.

Free to use — premium coming soon

FREE
  • Clean YAML output
  • Copy
  • 100% private
PREMIUM
  • Remove ads
  • Multi-document & options

About the JSON to YAML

JSON to YAML converts a JSON document into the equivalent YAML, the indentation-based format used across most modern configuration tooling. Both describe the same data model of objects, arrays, strings, numbers, booleans and null, so the conversion is a faithful re-encoding rather than a translation: every JSON object becomes a YAML mapping, every array becomes a sequence of dashed items, and braces, brackets and most quotes simply fall away. The result is a flatter, less noisy file that reads closer to plain notes than to code, which is exactly why teams reach for YAML once a config grows past a handful of keys.

Use this tool when something hands you JSON but the system that consumes it expects YAML. That happens constantly: Kubernetes manifests, Helm charts, Docker Compose files, GitHub Actions and GitLab CI pipelines, and Ansible playbooks are all conventionally written in YAML, yet APIs, exports and code often emit JSON. Pasting JSON straight into a YAML field usually works, since under YAML 1.2 every valid JSON document is also valid YAML, but it looks out of place and cannot carry comments. Converting first gives you clean, idiomatic YAML you can annotate, diff and review like the rest of your config.

The conversion runs entirely in your browser. The tool parses your JSON into an in-memory structure, then serialises that structure back out using YAML's block style: two-space indentation for nesting, a dash and space for list items, and key-colon-value pairs for mappings. Strings that could be misread as numbers, booleans or dates get quoted automatically so their meaning is preserved. Because YAML has no braces to mark scope, indentation alone defines structure, so the output is carefully aligned, never mixes tabs with spaces, and keeps every nesting level consistent.

Nothing you paste is uploaded or stored on a server, which matters because config files frequently contain secrets, internal hostnames or API keys. The trade-off to understand is fidelity, not privacy: JSON and YAML share the same data types, so a round trip is lossless, but YAML can express things JSON cannot, such as comments and anchors. Converting from JSON simply will not invent those, so the output is the plain, comment-free equivalent of your input. If a value matters as text, check that it stayed quoted after conversion before committing the file.

Frequently asked questions

Is converting JSON to YAML lossless?

Yes. JSON and YAML describe the same data model (objects, arrays, strings, numbers, booleans, null), so converting JSON to YAML preserves every value and structure. The only things YAML can add that JSON lacks, like comments and anchors, simply won't appear because they weren't in your JSON to begin with.

Why does the tool put quotes around some of my string values?

YAML guesses types from how a value looks, so unquoted text like NO, yes, off, or 0123 can be read as a boolean or number instead of a string. Quoting these ambiguous values keeps them as the strings your JSON intended, avoiding the classic YAML "Norway problem" where the country code NO turns into false.

Can I paste the YAML straight into a Kubernetes or Docker Compose file?

Usually yes. The output uses two-space indentation and standard block style that Kubernetes, Docker Compose, and CI tools expect. Just confirm the indentation level matches where you paste it, since YAML uses indentation rather than braces to define structure.

Does YAML support comments after conversion?

YAML supports comments (lines starting with #), but converting from JSON cannot create them because JSON has no comment syntax to carry over. You get clean, comment-free YAML that you can then annotate by hand.

Is my data sent anywhere when I convert it?

No. The conversion happens entirely in your browser, so your JSON, including any secrets or internal hostnames in a config file, is never uploaded or stored on a server.

From our blog

How to Read a JWT: Decoding Tokens to Debug Authentication Problems

By the Super Simple Digital Tools Team · Updated June 2026

When an authentication flow breaks, the token itself is usually the best witness. A JSON Web Token is three Base64URL-encoded sections joined by dots, and decoding the first two gives you a direct look at what the issuing server actually put inside. Instead of adding print statements or digging through server logs, you can paste the token into a decoder and immediately see the algorithm, the claims, and the timestamps. That single step resolves a surprising share of login and API failures, because most of them come down to a value being wrong, missing, or expired.

Start with the header. It is small, typically just two fields: alg, the signing algorithm such as HS256 or RS256, and typ, almost always JWT. The header matters more than it looks. If your backend expects RS256 but the token says HS256, signature verification will fail no matter how correct the payload is. The header is also where algorithm-confusion attacks hide, so confirming alg is the value your system intends is a quick and worthwhile sanity check before you look anywhere else.

The payload is where the answers usually live. Look at sub to confirm the token is about the right user, iss to confirm it came from the issuer you trust, and aud to confirm it was meant for your service rather than another. Then check the timing claims. exp and iat are Unix timestamps in seconds, and a common bug is a token that is technically valid but expired, or one whose nbf (not before) time is still in the future because of clock skew between servers. Comparing exp to the current time explains most premature logouts.

It is worth repeating what a decoder does not do. It never tells you whether a token is authentic, because it does not check the signature. A token whose payload reads perfectly could still be forged, and a decoder will happily display it anyway. Authenticity depends on recomputing the signature with the correct key, and that verification must happen where the key lives: your server or a trusted local tool. Treat decoding as reading the token's claims, and verification as a separate, key-dependent step that no public web page should perform.

Finally, build a habit around privacy. Because the payload is plainly readable, a token is effectively a small unencrypted document containing whatever the issuer chose to include, often user identifiers and scopes. For day-to-day debugging in development, decoding tokens in the browser is convenient and fine. For anything touching production, decode locally or scrub the token down to a harmless example. The goal is to get the diagnostic value of seeing inside the token without ever handing a live credential to a page you do not fully trust.

  • Always check the alg field in the header first; a mismatch with what your backend expects is a frequent cause of failed verification.
  • Convert exp and iat from Unix seconds to a real date and compare exp against the current time to diagnose 'why did my session end early' bugs.
  • If a token is rejected despite looking valid, check nbf and account for clock skew between the issuing and validating servers.
  • Never decode a live production token in a tool you don't control; replace real values with dummy data, or decode it on your own machine.

Read the full guide →

Tool by the Super Simple Digital Tools Team. Reviewed by our editorial team. Free to use, no signup required.

Related tools