JSONC to JSON Converter
Turn JSON with comments into strict JSON. Line and block comments are removed, trailing commas are dropped and text inside strings, including web addresses with //, is left untouched.
How to Convert JSONC to JSON
Quick answer: paste your JSONC or open the file; the JSON appears below. Copy it or download the .json file.
-
1
Add your JSONC
Paste it or open a file.
-
2
Choose options
Adjust the output on the right.
-
3
Check the JSON
Errors are explained clearly.
-
4
Copy or download
Save it as .json.
What You Get
What Is JSONC?
JSONC, or JSON with comments, is JSON that also allows // and /* */ comments and, in many tools, trailing commas. Code editors and development tools commonly use it for settings files, because comments explain what each option does.
What Is JSON?
JSON is the most common format for data and settings exchanged between programs. It uses curly brackets for objects, square brackets for lists and double quotes around every key and text value. It is strict: no comments and no trailing commas are allowed, which makes it reliable for machines but less friendly to edit by hand.
Why Convert JSONC to JSON?
Editor and project settings files often contain comments, which strict JSON readers reject. Converting gives you clean JSON for scripts, web services and tools that cannot read comments.
How the Conversion Works
Comments starting with // run to the end of the line and are removed; /* */ comments are removed wherever they appear; commas before a closing bracket are dropped. Strings are skipped while removing comments, so "https://example.com" stays intact.
Example
The sample with a top comment, a block comment and trailing commas becomes standard JSON with the same settings.
Who Uses It?
Developers, testers and anyone feeding commented settings into tools that need strict JSON. Because everything happens in the browser, it is also safe for internal and confidential files.
Using Your JSON File
Use the JSON in any program, web service or script that reads JSON. Choose minified output for sending data and pretty output for files people will read. To tidy or validate it further, open it in the JSON Formatter.
Common Problems in JSONC Input
JSONC allows // line comments, /* block */ comments and trailing commas, and this converter removes all of them safely, without touching // or /* that appear inside quoted text such as web addresses. After comments are removed, the rest must be valid JSON, so keys still need double quotes. If something is wrong, the message shows the line, counted in your original file with the comments.
Checking Your JSON Output
Before using the JSON, look at the values that matter most: numbers should be numbers without quotes, true and false should be plain words, and dates appear as text in a standard layout. Keys keep the order they had in your input. If you plan to send the data to another program, choose the minified option to make it as small as possible; for files people will open, keep the indented layout.
Step by Step
Start by pasting your JSONC into the input box, or press Open File to load it from your device. The converter reads it straight away and shows the JSON in the output box. If the input has a problem, a short message explains what is wrong and where, so you can fix it in place. Next, adjust the options on the right; the output refreshes immediately so you can compare. When you are happy, press Copy to put the result on your clipboard, or Download to save it as a .json file ready to use.
Private, Free and Instant
The converter is free, with no sign-up, no limit beyond the 5 MB file size and no watermark. It runs in your browser, so settings files with passwords, server addresses or customer data are never uploaded or stored. Paste the content, drop a file on the input box or press Open File, then copy the result or download it with the right file extension. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android.
JSONC to JSON: Removing Comments
JSONC is JSON with comments, used by editors and configuration files such as those of Visual Studio Code. Standard JSON parsers reject comments and trailing commas.
What is removed
Line and block comments, and trailing commas. The data itself is unchanged. For the reverse, use JSON to JSONC.
Frequently Asked Questions
Questions about JSONC to JSON