Aller au contenu
uencoder

Convertir JSON to YAML and back without losing data

Translate entre JSON et YAML pour config fichiers, preserving nested structures, tableaux, et scalar types across le round-trip.

  1. 1

    YAML is a superset of JSON with indentation-based structure and fewer brackets — preferred for human-edited config. Converting JSON→YAML makes config readable; YAML→JSON makes it machine-parseable. The conversion must preserve types, nesting, and arrays.

  2. 2
    Convertisseur JSON ↔ YAML →

    Paste JSON. The tool outputs equivalent YAML with 2-space indentation, block style for maps and sequences, and proper quoting only where needed.

  3. 3

    Use the chain to convert JSON→YAML and immediately validate the YAML parses back to the same structure.

  4. 4

    Inverser direction: paste YAML, get JSON. Useful when a tool expects JSON input but your source is a YAML config.

  5. 5

    Watch for YAML-specific gotchas: unquoted strings that look like booleans (yes/no/on/off), numbers with leading zeros (interpreted as octal in YAML 1.1), and multi-line string folding. Quote ambiguous scalars to be safe.

Questions fréquentes

Why does my YAML have quotes around some strings but not others?
YAML quotes strings that would otherwise be misinterpreted — e.g. 'true' (would be boolean), '123' (would be number), strings with special characters. The converter adds quotes only where necessary to preserve the JSON type.
Can all JSON be converted to YAML?
Yes — YAML is a superset of JSON, so every valid JSON document is also valid YAML. The reverse is not true: YAML features like anchors, multi-document streams, and tags have no JSON equivalent and may be lost or rejected.

Workflows résolvant cette tâche

Comparer deux configs YAML via JSON
Convertir les configs YAML en JSON pour une comparaison diff-friendly des valeurs structurées.
PIPELINE
Convertir CSV en JSON puis YAML
Transformer des données CSV de tableur en YAML via un intermédiaire JSON, adapté à la génération de configuration.
PIPELINE
Coder une charge utile JSON pour transport URL
Préparer un Document JSON pour un Paramètre URL: embellir, Coder en Base64, puis encodage pourcent — le inverse exacte de le chaîne de décodage de paramètres imbriqués.
PIPELINE
ENV en JSON puis YAML
Convertir .env en JSON puis en YAML pour les configs de déploiement.
PIPELINE
HJSON en format JSON
Formater HJSON et convertir en JSON standard.
PIPELINE
INI en JSON puis YAML
Convertir INI en JSON puis en YAML pour un format de configuration moderne.
PIPELINE
Formater JSON et calculer une somme de contrôle d'intégrité
Pretty-printer un document JSON et calculer une somme CRC32 pour détecter toute modification ultérieure.
PIPELINE
Minifier et valider JSON
Formater JSON pour inspection et valider sa correction syntaxique en une passe.
PIPELINE
Formater JSON et générer une interface TypeScript
Formater un document JSON puis inférer une définition d'interface TypeScript en une chaîne.
PIPELINE
Valider, formater, puis convertir JSON en YAML
Convertir une config JSON (possiblement minifiée) en YAML, capturant les erreurs de syntaxe au premier nœud au lieu de produire un YAML subtilement erroné.
PIPELINE
Convertir JSON en YAML puis TOML
Migrer une configuration JSON via YAML vers TOML pour des configs de projet Rust ou Python.
PIPELINE
JSON5 en format JSON
Formater JSON5 et convertir en JSON standard.
PIPELINE
JSONC en format JSON
Formater JSONC (JSON avec commentaires) et convertir en JSON standard.
PIPELINE
Décoder et formater une charge utile JWT
Analyser un token JWT, extraire sa charge utile et formater le JSON pour inspection.
PIPELINE
Properties en JSON puis YAML
Convertir les propriétés Java en JSON puis en YAML.
PIPELINE
Analyser chaîne de requête et formater JSON
Analyser une chaîne de requête en paires clé-valeur puis formater en JSON.
PIPELINE
Convertir TOML en JSON
Analyser un fichier de configuration TOML en JSON pour les outils et API attendant une entree JSON.
PIPELINE
Convertir TOML en JSON puis YAML
Transformer une config TOML en YAML via JSON pour Kubernetes ou CI.
PIPELINE
Convertir TOML en YAML via JSON
Transformer un fichier de configuration TOML en format YAML, utilisant JSON comme representation intermediaire.
PIPELINE
Decoder un parametre URL imbrique (Base64 JSON)
Derouler un parametre URL transportant du JSON Base64 code URL en JSON formate lisible.
PIPELINE
Convertir YAML en JSON
Convertir un document YAML en JSON et inspecter les valeurs analysees pour des surprises de coercition de type.
PIPELINE
YAML en JSON puis CSV
Convertir YAML en JSON puis en CSV pour usage tableur.
PIPELINE
Generer des interfaces TypeScript depuis YAML
Convertir un document YAML en definitions d'interface TypeScript, utilisant JSON comme format intermediaire.
PIPELINE
Valider et formater YAML
Convertir YAML en JSON pour valider sa structure, puis confirmer que le JSON est bien forme.
PIPELINE

Outils associés