JSON Syntax

Can json use single quotes?

No, valid JSON does not support single quotes for strings. The JSON specification strictly requires double quotes for both object keys and string values. Using single quotes will result in a parsing error in standard JSON parsers. This differs from JavaScript, which accepts both single and double quotes interchangeably. The strict double-quote requirement ensures consistency and simplifies parsing across different platforms and languages. If you have data with single quotes, you must convert them to double quotes before it can be parsed as valid JSON. Some JavaScript-specific parsers may accept single quotes, but this creates non-standard JSON that will fail in other environments. Always use double quotes to ensure maximum compatibility.
Last updated: December 23, 2025

Still have questions?

Can't find the answer you're looking for? Please reach out to our support team.