JSON5 Validator & Converter
Validate JSON5 with comments and unquoted keys, then convert to strict JSON.
- 100% client-side · your data never leaves your browser
- Instant, no rate limits
- Free, no sign-up
Validate JSON5 on the left, then convert to strict JSON.
Overview
JSON5 Validator & Converter — Validate JSON5 Online
Validate JSON5 and convert it to standard JSON. JSON5 is a human-friendly superset of JSON that allows comments, trailing commas, unquoted keys, single quotes, and multi-line strings — features that make config files pleasant to write but that strict JSON.parse rejects. Paste your JSON5, catch syntax errors with line and column pointers, and export clean JSON that any parser accepts. All client-side.
What JSON5 adds over JSON
- Comments — both // single-line and /* block */
- Trailing commas in objects and arrays
- Unquoted object keys (identifier-style)
- Single-quoted strings and multi-line strings
- Hexadecimal numbers, leading/trailing decimal points, and +Infinity / NaN
Why convert JSON5 to JSON
JSON5 is great for authoring — config files, fixtures, and tweakable settings read better with comments and trailing commas. But most runtimes, APIs, and data stores only accept strict JSON. Converting strips comments and normalizes the syntax so the result passes a standard JSON.parse and can be committed, transmitted, or stored anywhere.
The validator reports the first syntax error with a line and column so you can fix authoring mistakes quickly, even in large hand-written config files.
JSON5 vs strict JSON validation
If you validate a JSON5 file with a strict JSON validator, every comment and trailing comma is reported as an error — which is noise, not signal. Use this JSON5 validator for files that are intentionally JSON5. For files that must be strict JSON, use the JSON Validator instead so authoring conveniences are correctly flagged.
FAQ
Frequently asked questions
Will conversion keep my comments?
No. Comments are not valid in standard JSON, so they are removed during conversion. Keep your original JSON5 file if you want to preserve the comments for editing.
Are trailing commas allowed?
Yes, in JSON5. Trailing commas in objects and arrays validate correctly and are removed in the converted strict-JSON output.
Can I use single quotes?
Yes. JSON5 permits single-quoted strings and unquoted identifier keys; both are normalized to double quotes in the JSON output.
Is JSON5 the same as JSONC?
They overlap but are not identical. JSONC (used by VS Code) mainly adds comments and trailing commas; JSON5 adds those plus unquoted keys, single quotes, and more number formats.
Continue with a related tool
All tools- JSON Validator
Validate JSON instantly with precise, human-readable error messages and line numbers.
- JSONL Validator & Formatter
Validate and format JSON Lines — one JSON object per line.
- JSON Analyzer & Parser
Analyze JSON structure — depth, key counts, types, and top-level fields at a glance.
- JSON Repair & Fix
Fix invalid JSON: trailing commas, quotes, unquoted keys, and LLM markdown fences.
- JWT Decoder
Decode JWT header and payload — inspect claims without verifying signatures.
- JSON Editor
Write, edit, format, minify, and validate JSON in a fast full-screen or embedded editor.