YAML to JSON.

ブラウザでYAMLをJSONに即座に変換。高速、無料、開発者向け — アップロード不要、行単位エラー、完全なクライアントサイド処理。

ブラウザで処理No upload, no signup

YAML input

0 lines · 0 chars

JSON output

0 lines · 0 bytesIndent: 2 spaces

What is YAML?

YAML is a human-friendly data serialization format used for configuration, CI pipelines, and Kubernetes manifests. It uses indentation (no braces or brackets) to express structure and supports maps, sequences, scalars, anchors, and multiline strings.

What is JSON?

JSON is the lingua franca of web APIs. It is strict about quoting strings and has only six value types — object, array, string, number, boolean, and null. Every YAML document can be expressed as JSON, but not the other way around.

YAML vs JSON.

YAML optimises for humans. JSON optimises for machines. YAML allows comments and anchors; JSON does not. YAML is whitespace-sensitive; JSON uses explicit { } and [ ]. When you convert from YAML to JSON, comments are dropped and YAML's flexible scalars (unquoted strings, dates) are emitted as proper JSON types where possible.

How to convert YAML to JSON.

  1. Paste your YAML into the left panel (or load the example).
  2. The converter runs on every keystroke — you should see JSON on the right immediately.
  3. Copy or download the result. To go the other way, click To YAML.

Common YAML conversion errors.

// Mixed indentation

user:
 name: John
  age: 25

YAML requires consistent indentation. The line above mixes two and four spaces, which is a parse error.

// Missing colon

title YAML without a colon

Every key in a mapping needs a : separator. Without one, YAML reads the line as a plain scalar and skips it.

// Tab characters

key:	value

YAML forbids tabs for indentation. Use spaces only. Most editors convert tabs to spaces automatically — but a stray one will break the file.

// Unsupported syntax

This converter supports the core YAML 1.2 spec. Custom tags and esoteric directives are not parsed.

入力はローカルで処理され、アップロードされません。DevTools → Networkで確認できます。

YAML to JSON 例.

// シンプルオブジェクト

// ネストされたオブジェクト

// 要素の配列

よくある質問.

YAMLはサーバーに送信されますか?

いいえ。変換はJavaScriptを使ってブラウザ内で完全に実行されます。ネットワークタブを開くと、データを含むリクエストは表示されません。

コメントは保持されますか?

JSONにはコメント構文がないため、変換中にコメントは削除されます。

無効なYAMLの場合どうなりますか?

解析が失敗した正確な行と列、および最も可能性の高い修正を説明するヒントを含むエラーメッセージが表示されます。

.yamlや.ymlファイルをアップロードできますか?

はい。ファイルを入力パネルにドラッグするか、アップロードボタンを使用します。

どのサイズのYAMLを変換できますか?

固定の制限はありませんが、非常に大きいファイルはUIを一時停止させる場合があります。

YAMLからJSONへの変換は安全ですか?

はい — 最も強力な保証は、データがブラウザを決して出てこないことです。

YAMLからJSONへの変換

YAMLデータをJSON形式に変換します。YAMLのネストされた構造がJSONのオブジェクト構造に変換されます。

YAMLの配列はJSONの配列に、マップはJSONのオブジェクトに変換されます。データ型も対応するJSON型に変換されます。

JSONはWeb開発で最も一般的なデータフォーマットであり、APIリクエストやレスポンスで広く使用されます。

YAML-to-JSONの使いどころ

Kubernetesリソース定義をJSON形式に変換し、JSONを扱うツールやAPIで使用する場合に便利です。

設定ファイルをJSON形式に変換し、JavaScriptやTypeScriptのアプリケーションで読み込む場合があります。

YAML形式のデータをJSON形式に変換し、JSONスキーマ検証やJSONPathクエリで処理する際に使用します。

変換の詳細

YAMLのデータ型(文字列、数値、ブール値、null)はJSONの対応する型に変換されます。文字列は二重引用符で囲まれます。

YAMLのコメントは変換後に除去されます。JSONはコメントをサポートしていないためです。

YAMLの anchors と aliases(& と *)は変換前に展開が必要です。展開しないと変換エラーになる場合があります。

関連ツール.