Passer au contenu

Free JSON prettifier, validator and minifier

Make JSON readable, find what’s wrong with it, compare two versions, or shrink it to one line. Paste JSON, or open or drop a file or a whole folder: every change is checked with the exact line and column of any error, and an editable tree lets you open objects and arrays and change keys and values in place. Everything runs in your browser.

How to use

  1. Paste, open or drop JSON

    The page opens with an example. Paste your own JSON, choose a folder or file, or drop one onto the Preview. A folder lists all its JSON files. Files up to 50 MB are read on your device.

  2. Edit, minify and check

    In Edit mode the JSON shows as an editable, coloured tree or as plain text, prettified with 2 spaces, 4 spaces or tabs; Minify puts it on one line. Sort keys A–Z orders object keys. The check box confirms valid JSON or names the line and column of the first error, and Go to error jumps there.

  3. Compare, find and save

    Compare lists every difference between JSON A and B. Find searches keys and values. Save an opened file straight back, Save a copy as a new file, or copy the result.

Example

Paste {"id":12345678901234567890,"tags":["a","b",]} and the check reports the trailing comma on line 1. Remove it and the tree appears, with the JSON spread over lines with 2-space indents, and the id keeps all 20 digits instead of being rounded.

Good to know

Formatting changes only spaces and line breaks, so numbers, escapes and key order stay as written unless you sort keys. JSON with comments, single quotes or trailing commas is reported as an error with an explanation. Nothing is uploaded.

Embellissez, vérifiez et explorez JSON

La page s'ouvre avec un exemple à essayer. Collez votre propre JSON, déposez un fichier .json ou un dossier entier dans l'aperçu, ou choisissez-en un, et il sera formaté immédiatement. Un fichier que vous avez ouvert peut être enregistré directement sur votre ordinateur. Choisissez Modifier ou Comparer en haut, sous Formateur JSON. Dans Modifier, Affichage affiche le JSON sous forme d'arborescence, sous forme de texte brut (agrémenté de 2 espaces, 4 espaces ou tabulations) ou minifié sur une seule ligne, le tout coloré de la même manière ; Trier les clés de A à Z classe les clés d'objet à chaque niveau. La ligne en bas vérifie chaque modification et nomme la ligne et la colonne exactes d'une erreur. Le JSON s'ouvre sous la forme d'une arborescence modifiable : double-cliquez sur une clé ou une valeur pour la modifier, ajoutez, faites glisser ou supprimez des lignes et annulez toute modification. La barre de recherche recherche les clés et les valeurs et une icône de copie apparaît à côté des lignes que vous sélectionnez. Comparer affiche deux documents JSON côte à côte et répertorie toutes les différences. Enregistrez le fichier, enregistrez une copie ou copiez le résultat. Tout s'exécute dans votre navigateur ; rien n’est envoyé sur un serveur.

Votre vie privée

Gratuit, sans inscription. Le traitement des fichiers reste sur votre appareil ; l’analyse des sites Web et la publicité comportent des choix de confidentialité distincts.