JSON to JSONC Converter
Turn JSON into a JSONC settings file: neatly indented JSON with an optional comment at the top, ready for you to add // notes next to each setting in your editor.
How to Convert JSON to JSONC
Quick answer: paste your JSON or open the file; the JSONC appears below. Copy it or download the .jsonc file.
-
1
Add your JSON
Paste it or open a file.
-
2
Choose options
Adjust the output on the right.
-
3
Check the JSONC
Errors are explained clearly.
-
4
Copy or download
Save it as .jsonc.
What You Get
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.
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.
Why Convert JSON to JSONC?
Settings files are easier to maintain when they explain themselves. Starting from plain JSON, this gives you a properly formatted JSONC file with a header comment, so you can document options for the next person who edits it.
How the Conversion Works
The JSON is indented with 2 or 4 spaces and the text you enter becomes // comment lines at the top. The data itself is unchanged, and every JSONC reader can load the result.
Example
With the comment "Settings file", the sample becomes // Settings file followed by the indented JSON settings.
Who Uses It?
Developers setting up editor and project settings, and teams documenting configuration. Because everything happens in the browser, it is also safe for internal and confidential files.
Using Your JSONC File
Save the result with the .jsonc or .json extension your editor or tool expects, then add // comments next to settings to explain them. Most code editors open JSONC settings files with full highlighting and error checking.
Common Problems in JSON Input
Most JSON errors come from small slips: a missing comma between two items, an extra comma after the last item, single quotes instead of double quotes, or a comment left in the file. Text copied from documents can also contain curly quotes that look right but are not valid. The error message shows the line and position, so jump there, fix the character and the result updates straight away. If the file came from a code editor, it may really be JSONC, which has its own converter.
Checking Your JSONC Output
The output is standard JSON with your optional comment at the top, so any JSONC reader and most JSON readers that accept comments will load it. Indentation follows your choice. Comments are a great place to explain settings that are easy to get wrong, such as time limits, file paths or values that must match another file.
Step by Step
Start by pasting your JSON into the input box, or press Open File to load it from your device. The converter reads it straight away and shows the JSONC 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 .jsonc 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.
JSON to JSONC: Adding Room for Comments
JSONC allows comments and trailing commas. Converting from JSON produces text you can annotate by hand, as used by many editors for settings files.
Note
Only tools that expect JSONC can read comments. Strip them with JSONC to JSON before sending data to a strict parser.
Frequently Asked Questions
Questions about JSON to JSONC