YAML / JSON Converter

Convert JSON-compatible YAML and JSON, with explicit errors for unsupported values.

Paste or choose an input, select options and process it locally. Review the result before copying or downloading.

Options

Up to 1 MB of UTF-8 input and 100 nesting levels. One document only; duplicate keys, custom tags, aliases, non-string keys and non-finite numbers are rejected. Numbers outside JavaScript’s safe integer range are rejected; quote identifiers to preserve them. Comments and formatting are not preserved. Decimal numbers use IEEE 754 precision; quote precision-sensitive values.

How to use

What does this tool do?

Convert a single YAML 1.2 document to JSON, or turn JSON into readable YAML. Comments and formatting are not retained; values must fit JSON-compatible scalar, array and object types.

YAML / JSON Converter

Convert a single YAML 1.2 document to JSON, or turn JSON into readable YAML. Comments and formatting are not retained; values must fit JSON-compatible scalar, array and object types.

Step by step

  1. Paste or choose an input, select options and process it locally. Review the result before copying or downloading.
  2. Choose the direction that matches your input and use 2 or 4 spaces for indentation. YAML aliases, custom tags and non-string mapping keys are rejected instead of being silently rewritten.

Choosing the settings

OptionWhat changes
OptionsChoose the direction that matches your input and use 2 or 4 spaces for indentation. YAML aliases, custom tags and non-string mapping keys are rejected instead of being silently rewritten.
LimitsUp to 1 MB of UTF-8 input and 100 nesting levels. One document only; duplicate keys, custom tags, aliases, non-string keys and non-finite numbers are rejected. Numbers outside JavaScript’s safe integer range are rejected; quote identifiers to preserve them. Comments and formatting are not preserved. Decimal numbers use IEEE 754 precision; quote precision-sensitive values.

Example and expected result

items with pen and book becomes a JSON array containing 2 strings. active: true becomes the Boolean true.

If it is not working

  • Use one document with unique keys and at most 100 nesting levels. Quote unsafe integers or precision-sensitive decimals; non-finite numbers cannot be represented in JSON.

Formats and limits

Up to 1 MB of UTF-8 input and 100 nesting levels. One document only; duplicate keys, custom tags, aliases, non-string keys and non-finite numbers are rejected. Numbers outside JavaScript’s safe integer range are rejected; quote identifiers to preserve them. Comments and formatting are not preserved. Decimal numbers use IEEE 754 precision; quote precision-sensitive values.

FAQ

What does this tool do?

Convert a single YAML 1.2 document to JSON, or turn JSON into readable YAML. Comments and formatting are not retained; values must fit JSON-compatible scalar, array and object types.

Which setting should I choose?

Choose the direction that matches your input and use 2 or 4 spaces for indentation. YAML aliases, custom tags and non-string mapping keys are rejected instead of being silently rewritten.

What are the limits?

Up to 1 MB of UTF-8 input and 100 nesting levels. One document only; duplicate keys, custom tags, aliases, non-string keys and non-finite numbers are rejected. Numbers outside JavaScript’s safe integer range are rejected; quote identifiers to preserve them. Comments and formatting are not preserved. Decimal numbers use IEEE 754 precision; quote precision-sensitive values.

Why did processing fail?

Use one document with unique keys and at most 100 nesting levels. Quote unsafe integers or precision-sensitive decimals; non-finite numbers cannot be represented in JSON.

Is my input uploaded or saved?

No. Processing runs on your device. Inputs and results stay in this page’s memory until you clear it or leave. They are not uploaded, logged or stored by ToolRobin. Copying places the result on your device’s clipboard.