Skip to main content

JSON5 Converter

v1.0.0

Convert between JSON5 (comments, trailing commas) and strict JSON

Converts between JSON5 (with comments, trailing commas, unquoted keys, hex integers) and strict JSON — useful for cleaning config files like tsconfig.json, Babel, or ESLint configs, all client-side.

How to use
  • Paste JSON5 on the left and click Convert to produce strict JSON, or switch to JSON → JSON5 mode to add trailing commas and unquoted keys.
  • Comments (// and /* */), trailing commas, single-quoted strings, and hex literals (0x1F90) are all handled automatically.
  • Special values like Infinity and NaN are converted to string literals in JSON output since standard JSON has no representation for them.
  • Use the Examples picker to load sample config files with comments and trailing commas for quick testing.