Comment utiliser : JSON5 to JSON Converter
- Paste JSON5, JSONC or any “relaxed” JSON on the left.
- Strict JSON appears on the right; errors show the exact line and column.
- Choose the indent, and how
InfinityandNaN(not allowed in JSON) are written. - Copy the JSON.
JSON5 and JSONC vs. JSON
| Allowed in JSON5 | Example | Strict JSON |
|---|---|---|
| Comments | // note, /* … */ | removed |
| Trailing commas | [1, 2,] | [1, 2] |
| Unquoted keys | { name: "x" } | { "name": "x" } |
| Single quotes | 'text' | "text" |
| Hex, leading dot, plus sign | 0xFF, .5, +1 | 255, 0.5, 1 |
| Infinity, NaN | Infinity | null (or a string) |
| Multi-line strings | backslash at line end | one 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.