Cette page n’est pas encore traduite en français : elle s’affiche en anglais.

JSON5 to JSON Converter & Validator

Paste JSON5 or JSON with comments (JSONC, like tsconfig.json or VS Code settings) and get strict, valid JSON. Comments, trailing commas, single-quoted strings, unquoted keys, hex numbers and Infinity are handled — with the exact line and column of any error.

Mis à jour le
Special numbers

Vos données ne quittent jamais votre ordinateur. Tout le traitement se fait localement dans votre navigateur.

Comment utiliser : JSON5 to JSON Converter

  1. Paste JSON5, JSONC or any “relaxed” JSON on the left.
  2. Strict JSON appears on the right; errors show the exact line and column.
  3. Choose the indent, and how Infinity and NaN (not allowed in JSON) are written.
  4. Copy the JSON.

JSON5 and JSONC vs. JSON

Allowed in JSON5ExampleStrict JSON
Comments// note, /* … */removed
Trailing commas[1, 2,][1, 2]
Unquoted keys{ name: "x" }{ "name": "x" }
Single quotes'text'"text"
Hex, leading dot, plus sign0xFF, .5, +1255, 0.5, 1
Infinity, NaNInfinitynull (or a string)
Multi-line stringsbackslash at line endone line

JSONC (“JSON with comments”) is the format of tsconfig.json, VS Code and many editor settings: JSON plus comments and, often, trailing commas. JSON5 goes further. Both are great for hand-written config — but APIs, databases and JSON.parse need strict JSON.

Next steps: format and validate JSON, or convert it to YAML or TOML.

Aussi recherché comme : json5 to json, jsonc to json, json with comments, json5 parser, json5 validator, remove comments from json, trailing comma json, tsconfig to json.

Outils complémentaires : JSON5 to JSON Converter

  • JSON Validator — Paste JSON to check whether it is valid.
  • JSONL Converter — Turn JSON Lines (JSONL / NDJSON — one JSON object per line, as used by logs, BigQuery, OpenAI fine-tuning and data exports) into a JSON array, or an array back into JSONL.
  • JSON Schema to TypeScript — Paste a JSON Schema (draft-07 or 2020-12) and get TypeScript interfaces — required and optional properties, enums as union types, oneOf/anyOf as unions, allOf as intersections, $ref definitions as named types and descriptions as JSDoc comments.
  • JSON Minifier — Remove all unnecessary whitespace from JSON, validate it at the same time and see exactly how many bytes you save — before and after gzip.

Questions fréquentes

How do I remove comments from JSON?
Paste the JSON with comments here — the output is the same data as strict JSON, with every // and /* */ comment and trailing comma removed.
What is the difference between JSON5 and JSONC?
JSONC is JSON plus comments (and usually trailing commas), used by tsconfig.json and VS Code. JSON5 also allows unquoted keys, single quotes, hex numbers, Infinity and more.
What happens to Infinity and NaN?
Strict JSON has no Infinity or NaN, so they become null (like JSON.stringify does) or, if you choose, strings.
Is my data uploaded?
No. Parsing happens entirely in your browser.
Puis-je installer JSON5 to JSON Converter en tant qu’application web et l’utiliser hors ligne ?
Oui. JSON5 to JSON Converter est une application web installable (PWA) : elle s’installe depuis votre navigateur, sans passer par une boutique d’applications. Cliquez sur « Installer l’application » en haut de cette page dans Chrome ou Edge (Windows, macOS, Linux, ChromeOS) ; sur Android, utilisez « Partager » → « Ajouter à l’écran d’accueil » sur iPhone et iPad ; ou « Fichier » → « Ajouter au Dock » dans Safari 17+ sur Mac. L’application s’ouvre alors dans sa propre fenêtre avec sa propre icône, et comme elle s’exécute entièrement dans votre navigateur, elle continue de fonctionner hors ligne. Firefox sur ordinateur de bureau ne permet pas d’installer d’applications web. Comment fonctionne l’installation.

Outils similaires