我选

我选

办公所需全收藏

YAML 转 JSON 工具

将 YAML 数据转换为 JSON 格式

数据格式工具

工具说明

YAML 转 JSON 工具可以将 YAML 格式的数据转换为 JSON 格式,适用于配置文件转换、数据交换等场景。

支持的功能:

  • 输入 YAML 数据
  • 实时预览转换结果
  • 复制转换后的 JSON
  • 下载转换后的 JSON 文件
  • 加载示例 YAML

使用方法:在左侧输入 YAML 数据,查看右侧转换结果。

转换器

YAML 输入

0 字符

JSON 输出

                      
                    

使用示例

// YAML 输入:
name: John Doe
age: 30
email: john@example.com
address:
  street: 123 Main St
  city: New York
  zip: 10001
hobbies:
  - reading
  - gaming
  - coding

// JSON 输出:
{
  "name": "John Doe",
  "age": 30,
  "email": "john@example.com",
  "address": {
    "street": "123 Main St",
    "city": "New York",
    "zip": "10001"
  },
  "hobbies": ["reading", "gaming", "coding"]
}

相关工具

JSON 转 YAML 工具

JSON 转 YAML 格式

XML/JSON 转换器

XML 和 JSON 格式互转