20 chars · 3 lines
Two-way sync · Edit either side and the other updates automatically.
20 chars · 3 lines
Two-way sync · Edit either side and the other updates automatically.
JSON encoding troubleshooting
UTF-8 does not require a BOM, but some editors and exporters still prepend one. Native JSON.parse can treat that U+FEFF character as an unexpected token, while tools that deliberately normalize one leading BOM can parse the remaining document safely. This tool is free to use. No account or payment is required.
Last updated
A file can visually begin with { while actually containing U+FEFF first. Hex viewers, code-point inspectors, or a check such as text.charCodeAt(0) can reveal it.
A BOM-like character inside a quoted JSON string may be real data. Limit cleanup to the first code point of the document rather than deleting every U+FEFF occurrence.
The input contains an invisible U+FEFF before the opening brace. The corrected text begins directly with the JSON object.
{
"name": "Ada"
}{
"name": "Ada"
}Common questions
No. UTF-8 JSON does not require a BOM, and many parsers expect the first character to be the first JSON token.
Inspect whether the string starts with U+FEFF, for example by checking text.charCodeAt(0) or text.startsWith("\uFEFF").
Yes. The JSON analyzer normalizes one leading BOM before parsing and keeps diagnostics aligned with the original input.
Debugging a specific JSON issue? Browse JSON troubleshooting.