JSON ⇄ YAML

JSON and YAML, converted both ways.

Switch between JSON and YAML quickly: turn JSON into readable YAML config, or YAML into parseable JSON. Supports nested objects, arrays and comments — all in your browser.

Everything runs locally in your browser

How to use

Pick a direction, paste JSON or YAML into the input, hit Convert to see the result on the right, then Copy result. YAML uses indentation for nesting and # for comments; failures are shown in the status bar.

FAQ

Does it handle complex structures?

Yes — nested objects, arrays and any combination. The YAML parser covers common block styles (mappings, sequences, scalars, inline comments) but not advanced features like anchor/alias.

Is my data uploaded?

No. All parsing and serialization happen in your browser; nothing is sent to a server.

示例与注意事项Example & notes

一个例子A worked example

把一段 k8s 配置(YAML)转成 JSON 喂给接口:粘贴 → 转换 → 复制结果,键名与层级保持一致。Turn a Kubernetes manifest from YAML into JSON for an API: paste, convert, copy — keys and nesting are preserved.

注意事项Things to watch

相关问答More Q&A

转换会改变数据内容吗?Does conversion change my data?

不会改变语义,但缩进会重排、注释与锚点引用会丢失,键顺序在 JSON 中不保证。Semantics stay the same, though indentation is rewritten, comments and anchors vanish, and key order is not guaranteed in JSON.

多大文件比较合适?How large can the file be?

建议 10MB 以内;更大的配置建议用命令行工具处理,避免浏览器卡顿。Stay under roughly 10 MB; larger files are better handled by command-line tooling.

Further reading

觉得好用?Found it useful?