JSON5 Parser Online — Free JSONC Reader
JSON5 parser online — parse JSON5 / JSONC (tsconfig.json, VS Code settings) with comments and trailing commas. Convert to strict JSON, browser-based.
PDFFlare's JSON5 parser online converts JSONC and JSON5 (with comments and trailing commas) to strict JSON that any parser will accept. Used heavily for tsconfig.json and .vscode/settings.json. Single-quoted strings, unquoted keys, and block / line comments all handled.
Need to format strict JSON? JSON Formatter. Sort keys? JSON Sort. View as a tree? JSON Viewer.
How to Parse JSON5 / JSONC to Strict JSON
Paste JSON5 or JSONC
tsconfig.json, .vscode/settings.json, a config with comments and trailing commas, a snippet using single quotes — anything that strict JSON.parse rejects.
Click Parse to JSON
PDFFlare strips comments, accepts trailing commas, and converts to strict JSON. The output is what JSON.parse would accept.
Copy and use anywhere
Drop the strict JSON into any system that doesn't accept JSONC — APIs, databases, JSON-only config loaders.
When Do You Need a JSONC / JSON5 Parser?
tsconfig.json review: You want to inspect a tsconfig in a tool that only speaks strict JSON. Paste, parse, get clean output.
Migrating from JSONC to JSON: You're moving config out of JSONC into a system that only accepts strict JSON (databases, some CI tools). Convert all the comment-bearing files in one go.
Debugging config drift: Compare two .vscode/settings.json files structurally. JSON Diff expects strict JSON — parse JSONC first, then diff.
JSON-only API ingestion: The source provided JSON5; the sink only accepts strict JSON. Convert in the middle without writing custom code.
Why Choose PDFFlare's JSON5 Parser Online?
Real-World JSONC Coverage
Comments, trailing commas, single quotes, unquoted keys — handles the cases that show up in tsconfig.json, VS Code settings, and most JSON5 configs.
Pretty-Printed Output
Configurable indentation (2 spaces, 4 spaces, tab) so the output matches your project's style.
100% Browser-Based
Configs stay on your device — safe for tsconfig, settings.json, or any internal config with secrets.
No Signup Required
No account, no rate limits.
Frequently Asked Questions About JSON5 / JSONC Parser
PDFFlare's JSON5 Parser tool runs entirely in your browser. Strict JSON (RFC 8259) doesn't allow comments, trailing commas, single-quoted strings, or unquoted keys. JSONC ('JSON with Comments') is a common Microsoft variant used in tsconfig.json and VS Code settings — adds // and /* */ comments and trailing commas. JSON5 is a broader spec that adds single-quoted strings, unquoted keys, hex literals, NaN/Infinity, and more.
// line comments, /* block comments */, trailing commas in objects and arrays, single-quoted strings, unquoted object keys (alphanumeric + _ $), hex escapes (\xNN), and NaN/Infinity. Covers nearly all real-world JSONC and JSON5 files. For full spec compliance, the official json5 npm package is more strict on edge cases.
Crockford's original JSON spec deliberately omitted comments to keep the format minimal and discourage parsers from drifting toward JavaScript. The JSONC / JSON5 variants exist precisely because config files benefit from comments — tsconfig.json, package.json (sometimes), .vscode/settings.json all rely on JSONC.
No — strict JSON has no comment syntax, so they're stripped. If you need to preserve documentation, move the comments into a separate _doc field with the comment text as the value, or keep the JSONC original alongside the strict output.
Silently accepted and dropped. {"a": 1, } becomes {"a": 1}. [1, 2, 3,] becomes [1, 2, 3]. Both at the end of a value list and after the last element of a single-element collection.
Accepted and converted to double quotes in the output. {'a': 'b'} becomes {"a": "b"}. Embedded escape sequences (\n, \t, \u00xx) are processed identically in both quote styles.
Yes — tsconfig.json uses JSONC, and this parser handles all the JSONC features (comments, trailing commas) it uses in practice. Paste your tsconfig.json or .vscode/settings.json and you'll get strict JSON back.
No. The parser runs entirely in your browser. Your input never uploads — safe for config files containing tokens, internal hostnames, or secrets.