Toolvist

Conversor de YAML a JSON

Convierte YAML a JSON online: pega tu YAML y obtén JSON válido para copiar o descargar. Conversor gratuito que admite mapas y listas anidadas.

Conversor de YAML a JSON gratuito

El conversor de YAML a JSON traduce YAML a JSON para usarlo en APIs y JavaScript. Admite el subconjunto YAML común: mapeos anidados, secuencias y escalares (cadenas, números, booleanos, null).

The reverse is the JSON to YAML Converter, and the configuration's syntax is worth confirming with the YAML Validator. If the data is destined for a table rather than a config file, the YAML to CSV Converter is the next step.

Cómo usar YAML a JSON

  1. 1 Paste your YAML or load a file.
  2. 2 Convert. Indentation is significant in YAML, so a mis-indented block is reported rather than guessed.
  3. 3 Check the resulting structure against what you expected.
  4. 4 Copy the JSON, or format it first for readability.

Cómo usarlo

Pega YAML y haz clic en Convertir. El JSON equivalente aparece a la derecha.

  • Maneja mapas indentados y secuencias "- "
  • Convierte escalares (números, true/false, null) automáticamente
  • Ideal para YAML de estilo configuración

Subconjunto admitido

Las funciones avanzadas de YAML (anclas, escalares de bloque multilínea, flujos complejos) no se admiten. Para esos casos, usa un analizador completo como js-yaml en tu pipeline de compilación.

Preguntas frecuentes

Why did my YAML fail to parse when it looked fine?

Because YAML is whitespace-sensitive, and a tab where a space was expected is a hard error. Tabs are not permitted for indentation in YAML at all. Mixed indentation, or a value that contains an unquoted colon, are the other common causes — a colon inside a plain string has to be quoted or the parser reads it as a key.

How does YAML handle types that JSON does not have?

By supporting more of them. YAML has dates, timestamps, anchors and aliases for reuse, and multiple documents in one stream. Converting to JSON forces a decision: dates become strings, anchors are expanded, and only one document can be represented. The information is not lost so much as narrowed to what JSON can express.

Is JSON a strict subset of YAML?

Effectively yes for practical purposes, which surprises people. Most JSON documents are valid YAML, since YAML's flow style mirrors JSON's braces and brackets. The reverse is not true, because YAML allows constructs JSON has no representation for.

Herramientas para desarrolladores relacionadas

Ver todo en Herramientas para desarrolladores →

También te puede interesar

Herramientas de otras categorías que suelen combinarse con YAML a JSON:

Explorar el directorio completo →