Loading…

How to use JSONC to JSON

Paste JSONC with comments and trailing commas, and the tool strips them, validates the result, and outputs clean JSON.

Frequently asked questions

What is JSONC?

JSONC is JSON with comments, used by config files like tsconfig.json and VS Code settings. Standard JSON parsers reject its comments and trailing commas.

Does it protect strings?

Yes. Comment markers and commas inside string values are ignored, so URLs like http://example.com and comment-like text inside strings are preserved.

Is the output validated?

Yes. After stripping comments and trailing commas the tool parses the JSON, so invalid input produces a clear error instead of broken output.

More Code Formatters

JSON to Query String
Convert a flat JSON object into a URL-encoded query string with repeated keys for arrays
Line Counter
Count lines of code, blank lines, comment lines, and character statistics
Code Diff Viewer
Compare two code snippets and highlight differences with additions and deletions
Indentation Converter
Convert between tabs and spaces with customizable tab size for code formatting
Universal Code Beautifier
Generic code beautifier that works with any programming language syntax
CSV Column Aligner
Align CSV columns into an even monospace table so data is easy to read and scan
Env File Sorter
Sort .env files alphabetically by key, keep comments grouped and drop empty lines
Whitespace Normalizer
Normalize line endings to LF, strip trailing whitespace and collapse trailing blank lines
Blank Line Collapser
Collapse runs of consecutive blank lines into a single blank line for tidy documents
CSS Formatter
Beautify and format CSS code with proper indentation and structure for better readability
CSS Minifier
Minify CSS by removing whitespace, comments, and unnecessary characters to reduce file size
SQL Formatter
Format SQL queries with proper keywords capitalization, indentation, and line breaks

← View all Code FormattersBrowse all 1,100+ tools →