JSONC to JSON Converter
Remove comments and trailing commas from JSONC config files like tsconfig.json and VS Code settings.json to get strict JSON that any parser accepts - with exact error line and column reporting.
Loading tool...
What is JSONC to JSON Converter?
The JSONC to JSON Converter strips comments and trailing commas from commented JSON files and returns strict, valid JSON. It is built for the config files developers read every day: tsconfig.json, VS Code settings.json, devcontainer.json, and any other JSON with Comments that a strict parser refuses to load.
Key Benefits
- Turns commented config files into strict JSON that any parser accepts
- String-aware scanning keeps URLs, file paths, and glob patterns intact
- Points at the exact line and column when the syntax is broken
- Formatting control: indentation, minified output, and optional key sorting
- Runs fully in the browser, so internal config files never leave your machine
Common Use Cases
- β’Converting tsconfig.json before a bundler or CI step reads it
- β’Cleaning VS Code settings.json before sharing it with the team
- β’Preparing devcontainer.json for a tool that only accepts strict JSON
- β’Normalising a commented config file so a JSON diff stays readable
- β’Debugging a config file that fails to parse somewhere else
Convert JSONC to Strict JSON
- Paste the JSONC: Drop in the contents of tsconfig.json, settings.json, or any JSON file that uses comments and trailing commas.
- Read the converted JSON: The tool removes comments and trailing commas instantly, shows valid JSON in the output box, and reports how many items it stripped.
- Pick the formatting: Choose 2 spaces, 4 spaces, tab, or minified output, and turn on A-Z key sorting if you plan to diff the file.
- Copy or download: Copy the result to your clipboard or download it as converted.json, then replace the original config file.
Key Features
- Strips line comments, block comments, and trailing commas in one pass
- String-aware scanner keeps URLs and glob patterns intact
- Reports the exact line and column of a JSON syntax error
- Choose 2-space, 4-space, tab, or minified output
- Optional A-Z sorting of object keys for readable config diffs
- Runs entirely in your browser - paste a config file without uploading it