Aller au contenu
uencoder

Formater, valider, et repair malformed JSON

Prendre un JSON chaîne (possibly minified, avec trailing commas, ou comments) et produce valide, indented JSON avec erreur diagnostics.

  1. 1

    JSON from APIs is often minified for transport, and JSON from humans often has errors (trailing commas, single quotes, comments). Formatting makes it readable; validation catches structural errors before parsing fails in production.

  2. 2
    Validateur JSON →

    Paste the JSON. The tool reports whether it is valid and, if not, the exact location and nature of the syntax error (unexpected token, missing comma, unterminated string).

  3. 3
    Formateur JSON →

    Paste valid (or valid-ish) JSON to re-indent it with 2 spaces, sort keys if desired, and normalize whitespace for consistent diffs.

  4. 4

    Use the chain to validate-then-format in one pass: if validation fails you get the error; if it passes you get formatted output.

Questions fréquentes

Why does my JSON with comments fail validation?
Standard JSON (RFC 8259) does not allow comments. Some parsers (JSON5, JSONC used by VS Code) accept them, but strict JSON does not. Strip comments before sending to a strict parser, or use a JSONC-aware parser.
Can the tool fix trailing commas automatically?
Strict JSON forbids trailing commas. The validator flags them; some formatters can strip them during formatting. However, automatic repair can mask real errors — always review the diff after any auto-fix.

Workflows résolvant cette tâche

Hash BLAKE avec somme de contrôle CRC32
Calculer le hash BLAKE puis la somme de contrôle CRC32 pour vérifier l'intégrité.
PIPELINE
Convertir la casse de nommage et valider en JSON
Convertir les identifiants en convention de nommage cible, puis valider le résultat en JSON pour confirmer la structure.
PIPELINE
Comparer deux configs YAML via JSON
Convertir les configs YAML en JSON pour une comparaison diff-friendly des valeurs structurées.
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
Hacher le texte et vérifier avec somme CRC32
Calculer à la fois un hachage cryptographique SHA-256 et une somme de contrôle CRC32 pour la vérification d'intégrité des données.
PIPELINE
HJSON en format JSON
Formater HJSON et convertir en JSON standard.
PIPELINE
Formater JS et valider JSON
Formater le code JS puis valider en JSON.
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
Générer JSON Schema et valider
Générer un JSON Schema à partir de données d'exemple puis valider par rapport à lui.
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
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
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
Hash SHA3-256 avec somme CRC32
Calculer le hash SHA3-256 puis la somme CRC32 pour une double vérification d'intégrité.
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 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
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