Processed in your browser

YAML / JSON5 Converter

Useful for development configuration migration. JSON5 comments, quote choices, hexadecimal notation, and relaxed syntax are parsed as data and cannot be recreated exactly after conversion.

Processed in your browser
0 / 1,000,000
Converted output

Tool guide

What is YAML / JSON5 Converter?

YAML and JSON5 Converter supports development configuration migration and relaxed-syntax compatibility checks. A dedicated parser reads comments, single quotes, unquoted keys, hexadecimal numbers, and trailing commas before YAML output, while reverse generation cannot recreate original comments, quotes, scalar styles, or hand formatting. Common workflows include the following. Convert development JSON5 into YAML. Generate readable JSON5 from YAML. Diagnose comment and number compatibility. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.

When to use it

  • Convert development JSON5 into YAML.
  • Generate readable JSON5 from YAML.
  • Diagnose comment and number compatibility.

How to use it

  1. Identify whether the input is YAML or JSON5.
  2. Check for comments and special numeric values.
  3. Load a realistic nested example.
  4. Convert and resolve parser errors.
  5. Review comment and number normalization before copying.
  6. Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.

Runnable examples

The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.

Example 1

name: JSONLane
release:
  tools: 50
  ready: true
features: [comments, trailing-commas]

Example 2

// JSONLane configuration
{
  name: 'JSONLane',
  release: { tools: 50, ready: true },
  colors: [0x10243e, 0x26b6a4,],
}

Input rules

  • YAML uses restricted safe rules.
  • JSON5 may use syntax defined by that format.
  • Infinity, NaN, and dangerous structures are rejected.
  • Text input is counted before processing and is limited to 1,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
  • JSON5 comments and quote style are not retained.

Output rules

  • Comments and quote choices are removed.
  • Generated JSON5 may use unquoted keys.
  • Order follows parsed data.
  • Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
  • Infinity and NaN cannot enter the safe YAML/JSON data model.

Limitations and cautions

  • JSON5 comments and quote style are not retained.
  • Infinity and NaN cannot enter the safe YAML/JSON data model.
  • YAML anchors, tags, and scalar styles are not retained.

How your data is handled

All parsing, format conversion, Base64 work, and intermediate data remain in the current browser tab. JSONLane does not upload the input or retain it after refresh or close.

FAQ

Is YAML or JSON5 content uploaded?

No. Parsing, conversion, and output generation remain in the current browser tab.

Is every round trip lossless?

No. Comments, layout, type systems, and binary capabilities differ, so the page identifies the areas that require review.

Why can valid input still be rejected?

The destination may not have a safe representation. Dangerous keys, unsafe integers, excessive depth, and ambiguous mappings are rejected instead of silently rewritten.

Are JSON5 comments retained?

No. Parsing leaves data values only.

Why is Infinity rejected?

The safe YAML/JSON data model does not accept non-finite numbers.

Is JSON5 suitable for production APIs?

Only when explicitly supported; most APIs require strict JSON.

Updated: 2026-08-09