Esta página aún no está traducida al español, así que la mostramos en inglés.

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.

Actualizado el
Special numbers

Tus datos nunca salen de tu ordenador. Todo se procesa localmente en tu navegador.

Cómo usar: 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.

También se busca como: json5 to json, jsonc to json, json with comments, json5 parser, json5 validator, remove comments from json, trailing comma json, tsconfig to json.

Herramientas que combinan con: 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.

Preguntas frecuentes

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.
¿Puedo instalar JSON5 to JSON Converter como aplicación web y utilizarla sin conexión?
Sí. JSON5 to JSON Converter es una aplicación web instalable (PWA): se instala desde el navegador, no se descarga desde una tienda de aplicaciones. Haz clic en «Instalar aplicación» en la parte superior de esta página en Chrome o Edge (Windows, macOS, Linux, ChromeOS) o, en Android, utiliza «Compartir» → «Añadir a la pantalla de inicio» en iPhone y iPad, o «Archivo» → «Añadir al Dock» en Safari 17+ en un Mac. A continuación, se abrirá en su propia ventana con su propio icono y, como se ejecuta íntegramente en tu navegador, seguirá funcionando sin conexión. Firefox en el ordenador de sobremesa no permite instalar aplicaciones web. Cómo funciona la instalación.

Herramientas relacionadas