ToolKit

03 / DEVELOPER

YAML ↔ JSON Converter

Convert YAML 1.2 to JSON and back. The YAML parser is loaded only on demand, keeping the rest of the site lean.

Input
Output

How to use

  1. 1Pick a direction: YAML → JSON or JSON → YAML.
  2. 2Paste your input in the left pane; the converted output appears on the right.
  3. 3Errors include the parser's line and column information when available.
  4. 4Use Copy to grab the result.

Frequently asked questions

Which YAML version is supported?

YAML 1.2 via js-yaml's safe schema. Anchors and aliases work; custom tags are intentionally not loaded.

How are multi-document YAML streams handled?

Only the first document is converted. We treat single-document conversion as the common case; pass each document separately if you need to convert several.

Why is JSON → YAML output indented with spaces?

YAML doesn't allow tabs for indentation, so we use 2 spaces — the most widely-used convention. The output also wraps at sensible line lengths to stay readable.

Are dates and timestamps preserved?

YAML's native date types deserialize to ISO-8601 strings in JSON, since JSON has no date type. Round-tripping back to YAML keeps the string form.

Does the converter run in the browser?

Yes — js-yaml is loaded only when you first open this page, and never sends your data anywhere.

Related tools