A JSON formatter with comments handles JSONC (JSON with Comments) — the format used by VS Code settings.json, tsconfig.json, launch.json, and countless developer configuration files. Standard JSON rejects comments and trailing commas, causing strict parsers to fail on files that work fine in your editor.
JSONC allows // line comments, /* block comments */, and trailing commas after the last element in objects and arrays. This makes configuration files self-documenting — you can explain each setting inline without maintaining a separate README. Our formatter parses JSONC syntax and outputs clean, indented JSON.
Format Hubs's JSONC formatter uses a parser from the same family as VS Code, ensuring compatibility with the config files you edit daily. Paste tsconfig.json, ESLint config, or Helm values with comments, click Format, and get readable output. Minify mode strips comments and produces compact JSON for production APIs.
All processing runs in your browser. Internal configuration files, proprietary schema definitions, and infrastructure-as-code settings never upload to external servers. For strict RFC 8259 JSON without comments, use the standard JSON Formatter instead.
Note: This tool supports JSONC (comments + trailing commas), not full JSON5 (unquoted keys, single quotes). For VS Code configs and similar files, JSONC coverage handles the vast majority of real-world use cases.
How to JSON Formatter with Comments
- Paste JSONC content (with // or /* */ comments) into the editor.
- Choose indentation: 2 spaces, 4 spaces, or tabs.
- Click Format to beautify and strip comments from output.
- Copy or download the formatted JSON.
For the full tool experience, visit the JSONC Formatter page.