Single quotes in JSON are not allowed
Expected property name or '}' in JSON at position 1 (line 1 column 2) (classic message: "Unexpected token ' in JSON at position 0" in older V8)
JSON requires all strings — both keys and values — to be wrapped in double quotes. Single quotes are valid in JavaScript but are illegal in JSON. The error message varies by engine version: older V8 (Node 18, older Chrome) reports "Unexpected token '" while newer V8 says it expected a property name or "}". This is one of the most common errors when writing JSON by hand or converting JavaScript objects to JSON manually.
Single-quoted string keys
Property names in JSON must be double-quoted strings. Using single quotes around keys is the most direct trigger.
Invalid
{'name': 'Alice', 'age': 30}Valid
{"name": "Alice", "age": 30}Single-quoted string values
String values must also use double quotes. Single-quoted values produce the same parse error.
Invalid
{"greeting": 'hello world'}Valid
{"greeting": "hello world"}Mixed quotes from template or configuration files
Some YAML-to-JSON converters, Python repr output, or configuration generators emit single-quoted strings that look like JSON but are not. Always pass such output through a proper serializer (json.dumps in Python, JSON.stringify in JS) rather than relying on toString.
Invalid
# Python repr (not JSON):
{'items': ['a', 'b', 'c']}Valid
{"items": ["a", "b", "c"]}Fix this error in seconds
Paste your JSON in the free validator to find the exact line and column where the error occurs.
Open JSON Validator →Frequently Asked Questions
Can I use double quotes inside a JSON string value?
Yes, but they must be escaped with a backslash: {"message": "He said \"hello\""}. Alternatively, if a double quote would make the string hard to read, use a Unicode escape: \u0022.
My editor shows the JSON in single quotes — is it wrong?
Some editors and formatters display JSON with syntax highlighting that uses single quotes in the UI without changing the underlying file. The actual file on disk uses double quotes. Open the raw file in a plain text editor to confirm. If the file truly contains single quotes, it is not valid JSON and needs to be fixed.