HJSON to JSON Converter

Paste your HJSON with comments, trailing commas, and unquoted keys — get back clean, valid JSON instantly.

Summary

Paste your HJSON with comments, trailing commas, and unquoted keys — get back clean, valid JSON instantly.

How it works

  1. Paste or type your HJSON content into the input panel.
  2. The converter strips single-line (//) and block (/* */) comments.
  3. Trailing commas in objects and arrays are removed automatically.
  4. Unquoted string values and multiline strings are normalized to JSON strings.
  5. The resulting JSON is parsed and pretty-printed with 2-space indentation.
  6. Click "Copy JSON" to copy the clean output to your clipboard.

Use cases

  • Convert hand-written config files to JSON before feeding them to an API.
  • Strip comments from JSON-like files that include documentation comments.
  • Clean up config files exported from editors that allow trailing commas.
  • Validate that an HJSON document parses to the expected JSON structure.
  • Prepare HJSON configuration for tools that only accept strict JSON.
  • Remove trailing commas from JSON files that are slightly out of spec.

Frequently Asked Questions

Last updated: 2026-06-09 · Reviewed by Nham Vu