{ } JSON Validator — The 10 Errors You'll Actually Hit

Trailing commas, single quotes and the rest of the usual suspects

ToolsDevelopers

JSON is a small, strict format, which is exactly why it is reliable and exactly why tiny deviations break parsers. The same handful of mistakes accounts for nearly every "unexpected token" message. Here is the list, with the fix for each.

1. Trailing commas

A comma after the last item of an object or array is legal in JavaScript and illegal in JSON. It is the most common cause of a parse failure, especially in hand-edited config files. Delete the final comma before the closing brace or bracket.

2. Single quotes

JSON strings must use double quotes. Single-quoted values and keys are JavaScript habits. A bulk replacement works, but check for apostrophes inside strings first — they will need escaping or different quoting.

3. Unquoted keys

{"name": "x"} is valid; {name: "x"} is not. Every object key must be a double-quoted string. This breaks most often when someone copies an object literal from source code.

4. Comments

JSON has no comment syntax. // and /* */ are invalid, which is why some configuration formats extend JSON to allow them. Remove comments before parsing, or move notes into a dedicated field such as "_comment".

5. NaN, Infinity and undefined

None of these are JSON values. Use null, or represent the value as a string or a sentinel number. JavaScript's JSON.stringify silently converts NaN and Infinity to null, which is why the bug sometimes appears only at the receiver.

6. Numbers with leading zeros or stray symbols

01, 1. and 1,000 are invalid. JSON numbers have a strict grammar: no leading zeros, no thousands separators, no currency symbols, no trailing decimal point. Quote them as strings if they are identifiers such as phone numbers or PIN codes.

7. Unescaped control characters and quotes

A literal newline inside a string breaks parsing — use \n. A double quote inside a string must be escaped as \". Windows paths need doubled backslashes. These appear most often in pasted log lines and error messages.

8. Duplicate keys

The spec allows the text but not the semantics: behaviour is undefined and most parsers keep the last value. Validators and linters flag it; treat any duplicate as a bug because the losing value silently disappears.

9. BOM and hidden characters

A UTF-8 byte-order mark at the start of a file, or non-breaking spaces copied from a document, will fail parsing with an error that points at the wrong place. Paste into a plain-text editor or the JSON formatter and look for the first unexpected character.

10. Truncation

"Unexpected end of input" usually means the payload was cut off — a truncated API response, a partial file write, or a proxy with a size limit. Validate the length before blaming the syntax.

A fix workflow that works

  1. Paste into the JSON formatter and validator — it runs in your browser so nothing is uploaded.
  2. Read the reported position, not the message; the message is generic, the position is not.
  3. Fix the first error, re-validate. Errors cascade, so the second complaint may vanish with the first fix.
  4. Format the result to confirm the structure is what you expected, not merely parseable.

See also the JSON formatter guide and pretty-printing API responses.

Frequently asked questions

Why is my JSON invalid?

The usual causes are a trailing comma, single quotes, unquoted keys, comments, or a value like NaN or undefined. Validate to get the position, then fix the first error and re-check.

Does JSON allow comments?

No. JSON has no comment syntax, so // and /* */ make the document invalid. Some config formats extend JSON to permit them, but strict parsers reject them.

Is duplicate keys allowed in JSON?

The text may parse but behaviour is undefined and most parsers keep the last value, silently dropping the first. Treat duplicates as a bug.

Is my JSON uploaded when I validate it?

No. Formatting, minifying and validation run in your browser, so your data never leaves your device.

Related

⚠️ Accuracy & no-responsibility note:
This page is provided for general information only. Telecom licensing rules, fees, bank guarantees (PBG/FBG), eligibility and timelines change frequently and can vary by category, service area and applicant. Information here may be incomplete, out of date, or inaccurate, and should not be relied upon for any decision. Always cross-check with the official Department of Telecommunications (DoT) / TRAI portal and independent legal or licensed advice before acting. This page is not legal, financial or professional advice and creates no obligation. The site owner & PodNet accept no responsibility or liability for any loss, penalty or damage arising from reliance on this content.
For updates on rates, rules and the current status, please contact us on WhatsApp only — +91 95916 79292.
👀 45,002 views · 69 tools used

PodNet.in · Files stored on temp.sh / gofile.io · No data saved on this server
File sharing · Pastebin · URL shortener · QR · Password · JSON · Counter · Color
Guides
📄 ISP Licence Documents Required (2026)🛠️ How to Apply for an ISP Licence in India🌐 ISP Category A Licence🗺️ ISP Category B Licence💸 VNO Licence Fees in India (2026)♻️ ISP Licence Renewal in India📶 Wi-Fi Service Provider Licence in India🌾 Telecom Licence for Rural Broadband in India📁 Free File Upload Up to 2GB🧩 Online JSON Formatter & Validator🔗 Free URL Shortener📱 Free QR Code Generator🚀 How to Start an Internet Service Provider in India✅ ISP Licence Eligibility & Net-Worth Requirements🏦 ISP Licence Bank Guarantees🖥️ DoT Telecom eServices Portal☎️ OSP Registration in India💬 Bulk SMS in India🏢 ISP Licence for Apartment & Society Wi-Fi🧑‍💼 Telecom Licence Consultant📝 ISP Licence Amendment📶 VNO Category C Licence📋 Free Pastebin Alternative🔐 Free Online Password Generator🎨 Online Color Picker & Hex Converter🔤 Text Case Converter📡 Free QR Code for Wi-Fi📤 How to Share Large Files Without Email🔢 Online Word & Character Counter🧰 Free Online Tools for Developers🏘️ ISP Licence for a Village or Gram Panchayat📺 ISP Licence for Cable TV Operators (LCO Broadband)🌆 ISP Licence for a Small Town or District⚖️ ISP Licence vs VNO Licence🧾 ISP Licence Annual Fees, MAF and Licence Fee on AGR🚪 How to Surrender an ISP Licence in India🔄 ISP Licence Transfer, Acquisition & Ownership Change🤝 ISP Resellers, Franchisees and Local Partners📶 SACFA & WPC Clearance for Wireless ISPs🏗️ IP-I Registration🛰️ Captive VSAT Licence in India⏱️ ISP Licence Timeline & Process in 2026⚠️ ISP Licence Penalties and Non-Compliance Risk🧵 ISP Licence vs ISP-C (Cable) Registration📍 ISP Licence in Karnataka📤 Send Large Files Free Without Signup (2026)⏳ Temporary File Links & Expiry🔐 Share Text Snippets Securely🔗 URL Shortener Use Cases That Actually Matter💳 QR Codes for UPI Payment Links📇 vCard QR Codes🔑 Strong Password Practices in 2026{ } JSON Validator{ } Pretty-Print API Responses & JSON Logs📁 File Upload Limits and File Types Explained🛡️ No-Signup Online Tools and What They See💬 Short Links for WhatsApp and SMS Campaigns✍️ Using a Word Counter for Writers and SEO🎨 Colour Picker for CSS🖨️ QR Code Print Size & Scanning Reliability🔐 ISP Licence Security Conditions & Lawful Interception🧪 TEC GR Certification & MTCTE for ISP Equipment📑 ISP Tariff Publication & TRAI Obligations🪪 ISP Subscriber KYC, CAF & Onboarding📶 PM-WANI Integration for ISPs🔌 ISP Upstream Bandwidth Cost, Peering & NIXI🧾 ISP Billing, RADIUS Accounting & GST Invoicing🌍 FDI in Telecom & ISP Licensing in India📜 What Your ISP Licence Actually Permits (UL Scope)🚧 ISP Fibre Rollout