Unterminated string in JSON at position N (line L column C)
The parser read an opening double quote and reached the end of the input without finding the matching close. The reported position is where the string started, because that is the useful location: the missing quote itself has no position.
Paste your JSON and see exactly where it breaks
Nothing you paste leaves your browser. The connect-src allowlist makes that a browser guarantee rather than a promise. Check it yourself
What actually causes it
Ranked by how often each one turns out to be the answer.
-
01 An unescaped double quote inside the value
The first inner quote ends the string, and everything after it confuses the parser. This is the "my JSON looks valid but is not" case.
Breaks
{ "note": "she said "hello"" }Works
{ "note": "she said \"hello\"" } -
02 A trailing backslash
A Windows path ending in a backslash escapes the closing quote, so the string runs on into the rest of the document.
Breaks
{ "dir": "C:\logs\" }Works
{ "dir": "C:\\logs\\" } -
03 A genuinely missing quote
Simple to fix once located, which is what the line and column are for.
-
04 The file is truncated mid-string
A dropped connection or a size limit that cut the document in the middle of a value.
The same mistake in other runtimes
The underlying problem is identical; only the wording differs. If a colleague reports one of these, they are looking at the same thing you are.
| Python | Unterminated string starting at: line 1 column 6 (char 5) |
|---|
Questions
- Why does the position point at the start of the string?
- Because that is where the problem is diagnosable. The parser only knows something is wrong when it runs out of input, which could be thousands of characters later. Pointing at the opening quote tells you which string to look at.
Fix it now
Paste the payload into the tool above, or go straight to the one built for this job.
Find the open string