JSONC to JSON Converter

Remove single-line (//) and block (/* */) comments from JSONC configurations to compile clean, parseable JSON.

100% Client-Side (No data leaves your device)
Input JSONC Workspace
0 chars
1
Standard JSON Output
1
Standard JSON output will appear here...

User Guide: Converting comment-based JSONC to Standard JSON

What is JSONC?

JSONC (JSON with Comments) is a configuration file format used extensively in developer environments (like VS Code configurations or tsconfig.json). While comments are useful for documenting attributes, standard JSON engines (like JSON.parse) throw syntax exceptions when comments are present.

Step-by-Step Instructions

  1. Enter JSONC: Paste your configurations containing single-line or multi-line comments in the input panel.
  2. Run conversion: Click "Strip Comments". The compiler strips the comments using regex matches and validates the JSON output.
  3. Export results: Copy the code or download standard `.json` configuration files instantly.

Unicode-safe comment stripping algorithms

Simple line-based comment strippers break when comments are inside string attributes (like URL strings containing //). Our parser utilizes state-aware regular expressions to verify comment matches, stripping actual comment blocks safely while preserving valid strings.