Convert JSON to JSONC
Convert JSON to JSONC (JSON with Comments) instantly in your browser. Add documentation comments to configuration files. Free, private, no upload required.
By ChangeThisFile Team · Last updated: March 2026
ChangeThisFile converts JSON to JSONC instantly in your browser, adding comment capabilities to configuration files. Drop your JSON file, add documentation comments, get JSONC back in seconds. Free, private, and works offline.
Convert JSON to JSONC
Drop your JSON file here to convert it instantly
Drag & drop your .json file here, or click to browse
Convert to JSONC instantly
JSON vs JSONC: Format Comparison
Key differences between the two formats
| Feature | JSON | JSONC |
|---|---|---|
| Comments | Not allowed | Single-line (//) and block (/* */) |
| Standards compliance | RFC 7159 strict | Extended JSON syntax |
| VS Code support | Basic highlighting | Full IntelliSense + comments |
| Configuration use | Limited documentation | Self-documenting configs |
| Maintainability | External docs needed | Inline documentation |
| File extension | .json | .jsonc or .json |
| Parser support | Universal | VS Code, TypeScript compiler, some tools |
When to Convert
Common scenarios where this conversion is useful
VS Code settings documentation
Document complex VS Code settings.json and workspace configurations with explanatory comments for team members and future reference.
TypeScript configuration
Add comments to tsconfig.json explaining compiler options, path mappings, and build settings for better project documentation.
Package.json documentation
Document package.json scripts, dependencies, and configuration options with inline comments for easier project onboarding.
Application configuration
Transform configuration files into self-documenting formats with comments explaining environment variables, feature flags, and settings.
API schema documentation
Add explanatory comments to JSON schema files, API specifications, and data models for better developer experience.
How to Convert JSON to JSONC
-
1
Drop your JSON file
Drag and drop your JSON file onto the converter, or click to browse and select your configuration file.
-
2
Add comments instantly
The conversion happens automatically in your browser, preparing your JSON for comment insertion. No upload needed.
-
3
Download JSONC file
Click Download to save your JSONC file, ready for documentation comments and VS Code editing.
Frequently Asked Questions
JSONC (JSON with Comments) extends standard JSON to support single-line (//) and block (/* */) comments, making configuration files self-documenting. Standard JSON doesn't allow comments.
JSONC is supported by VS Code, TypeScript compiler, and many development tools. However, strict JSON parsers will reject JSONC files with comments. Check your tool's documentation.
No, JSONC should only be used for configuration files. API responses must use standard JSON without comments, as most HTTP clients and browsers don't support JSONC.
After converting to JSONC, open the file in VS Code or any text editor. Add // for single-line comments or /* */ for block comments anywhere in the file.
No, the conversion preserves your exact JSON structure, formatting, and values. It only prepares the file to accept comments without changing existing content.
Yes, conversion happens entirely in your browser with no file size limits. Large configuration files, schema definitions, and complex nested objects convert instantly.
Use .jsonc for files that contain comments to signal JSONC format. Some tools auto-detect JSONC in .json files, but .jsonc is clearer for documentation purposes.
Yes, but you'll need to remove all comments first. JSONC with comments cannot be converted to standard JSON without stripping comment syntax.
Yes, VS Code treats .jsonc files as JSON with Comments, providing syntax highlighting, error checking, and IntelliSense support for commented configuration files.
JSONC parsing is slightly slower due to comment processing, but the difference is negligible for configuration files. Use JSONC for development configs where documentation matters.
Node.js doesn't natively support JSONC. You'll need libraries like 'jsonc-parser' or 'strip-json-comments' to read JSONC files in Node.js applications.
The format conversion is reversible, but once you add comments to JSONC, removing them requires manual editing or tools that strip comments before converting back to standard JSON.
Related Conversions
Related Tools
Free tools to edit, optimize, and manage your files.
Need to convert programmatically?
Use the ChangeThisFile API to convert JSON to JSONC in your app. No rate limits, up to 500MB files, simple REST endpoint.
Ready to convert your file?
Convert JSON to JSONC instantly — free, no signup required.
Start Converting