OpusDesk Hub Tools

YAML to JSON

Convert a documented subset of YAML mappings and scalar lists to JSON locally.

A limited YAML subset: mappings, scalar lists, strings, finite numbers, booleans and null. Use two spaces per nesting level. Anchors, aliases, tags, flow collections, block strings and object items in lists are rejected. Maximum 100,000 characters, 1,000 lines and 32 nesting levels are application guardrails.

What this tool does

Convert simple YAML mappings and scalar lists using two-space indentation. Supported values are strings, finite decimal numbers, booleans and null. Unsupported syntax produces an error rather than a guessed conversion. This is not a full YAML 1.2 parser.

How to use YAML to JSON

  1. Paste a supported YAML document. Enter a mapping or scalar list. Use two spaces per nesting level. Quote values when you need to preserve numeric-looking text such as an identifier with leading zeros.
  2. Select Convert to JSON. Conversion runs when you press the button. Inspect errors for unsupported syntax. File uploads, automatic conversion, syntax highlighting and minified mode are not provided.
  3. Inspect and copy the JSON. Confirm that keys, list values and types match your input, then select Copy. Editing the input clears the old output so stale JSON is not mistaken for a new conversion.

How this tool works

Parses a documented block subset and preserves mapping keys and list values. Unsupported forms fail instead of being silently interpreted as unrelated strings.

  • Engine: Restricted YAML subset parser with explicit rejection
  • Supported input: Two-space indented mappings, Scalar lists, Strings, finite decimal numbers, booleans and null
  • Output: Indented JSON or a conversion error

Worked example

Input: items: - one - two

Output: {"items":["one","two"]}

Limits, edge cases, and troubleshooting

Convert small simple configuration snippets. Inspect types before copying the result.

  • 100,000 characters; 1,000 lines; 32 nesting levels. These are application guardrails.
  • Not full YAML 1.2: no anchors, aliases, tags, flow collections, block strings or object list items.
  • Unsafe integers, duplicate keys and ambiguous numeric forms are rejected.

When to use another workflow

Use a mature YAML parser in your target runtime for full YAML documents, schemas or production automation.

OptionBest forTrade-off
This browser toolQuick, private, one-off workLimited by browser memory and the documented feature set
Desktop or command-line toolBatch jobs and repeatable automationRequires installation and setup

Verification

Implementation checked on 2026-09-27. The displayed example and documented limits were checked with synthetic inputs. Unsupported input and the distinction between an estimate and a verified result were reviewed.

Supported inputs and limits

  • Two-space indented mappings
  • Scalar lists
  • Strings, finite decimal numbers, booleans and null
  • 100,000 characters; 1,000 lines; 32 nesting levels. These are application guardrails.
  • Not full YAML 1.2: no anchors, aliases, tags, flow collections, block strings or object list items.
  • Unsafe integers, duplicate keys and ambiguous numeric forms are rejected.

Frequently asked questions

Are anchors, aliases and all YAML features supported?

No. Anchors, aliases, tags, flow collections, block strings, merge keys, multiple documents and object items in lists are rejected. Use a full YAML parser when these features are required.

What are the supported limits and types?

This application allows 100,000 characters, 1,000 lines and 32 nesting levels as conservative guardrails. Numbers must be finite and integer values must fit JavaScript’s safe integer range. Quote identifiers and large integers to preserve their exact text.

Is information sent to a server?

Tool inputs are processed in this browser. This product does not use analytics or send your input to an external API. Clicking an external website link still visits that website.

Related tools