YAMLをJSONに、JSONをYAMLに双方向で変換します。変換しながら検証し、エラーを明確に表示します。すべてブラウザ内で処理されます。
YAML ⇄ JSONの使い方
変換方向(YAMLからJSON、またはJSONからYAML)を選択してください。
YAMLまたはJSONを入力パネルに貼り付けてください。
変換結果をコピーするか、入力が無効な場合はエラーを確認してください。
This converter transforms YAML into JSON and JSON into YAML, in both directions. Pick the direction, paste your input, and copy the converted result or read a clear error if the input is malformed.
Everything is processed locally in your browser, so your data stays on your device.
YAML and JSON describe the same kind of data, but with different priorities. JSON is strict and compact, which suits APIs and machines; YAML is indentation-based and easier for people to read and edit, which is why it dominates configuration files.
Each conversion parses the source first, so malformed input is caught and reported with the reason and often the line, instead of silently producing a broken result. A successful conversion therefore also tells you the input was valid.
It uses the YAML 1.2 and 1.1 compatible parser from js-yaml, covering the features you meet in practice: mappings, sequences, scalars, anchors and multi-line strings.
This is exactly the glue you need around CI pipelines, Kubernetes and Docker Compose files, and APIs that speak JSON while your config is written in YAML. It lets you move between the two without hand-editing.
One thing to know: YAML comments are dropped, because JSON has no concept of comments, and converting back generates fresh YAML without them.
よくある質問
js-yamlのYAML 1.2/1.1互換パーサーを使用しており、マッピング、シーケンス、スカラー、アンカー、複数行文字列などの一般的な機能に対応しています。
入力は変換前に解析されるため、無効なYAMLまたはJSONは理由と行番号を含むメッセージを表示し、問題を素早く特定するのに役立ちます。
いいえ。JSONにはコメントがないため、変換中にYAMLコメントは削除されます。変換後はコメントなしの新しいYAMLが生成されます。
いいえ。変換はすべてブラウザ内で実行されます。貼り付けたデータがお使いのデバイスから出ることはありません。
このツールを埋め込む
このツールをご自身のウェブサイトに追加できます。下のコードをコピーしてください。内容は自動的に最新の状態に保たれます。
<iframe src="https://monu.tools/embed/ja/yaml-json-converter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>関連ツール