ToolPal

YAML ↔ JSON 转换器

在浏览器中即时将YAML转换为JSON或JSON转换为YAML。支持嵌套对象、数组和所有YAML数据类型。

使用方法

在浏览器中即时将YAML转换为JSON或JSON转换为YAML。支持嵌套对象、数组和所有YAML数据类型。

  1. 1Select the conversion direction: YAML → JSON or JSON → YAML using the mode buttons.
  2. 2Paste your YAML or JSON into the input textarea, or click 'Load Example' to see sample data.
  3. 3Choose your preferred indentation (2 or 4 spaces) from the Indent selector.
  4. 4Click Convert. The result appears below. Click 'Copy to Clipboard' to use it.

主要功能

  • Bidirectional — convert YAML to JSON or JSON to YAML with one click
  • Configurable indentation — choose 2 or 4 spaces for output formatting
  • Full type support — handles strings, numbers, booleans, nulls, arrays, nested objects
  • Resolves YAML anchors and aliases to final values automatically
  • 100% browser-based — your data never leaves your device

常见问题

了解更多