Formatter Validator Minifier Escape / Unescape JSON ↔ String JSON ↔ YAML JSON → CSV NDJSON / JSON Lines JSON → Types JSON ↔ XML JSON Diff JSON Patch Canonicalize (RFC 8785) Schema Validator Schema Generator JSONPath Tester JWT Decoder JSON Errors Schemas More Tools
JSONTools / JSON errors / Found EOF while looking for a key name (check your
hjson · Node.js 22.22.2

Found EOF while looking for a key name (check your syntax) at line L,30

This message comes from hjson on Node.js 22.22.2. In this registry it is produced by 1 distinct mistake. Positions in the real message vary with your input; the causes do not.

What produces this message

HTML received where JSON was expected

Input
<!DOCTYPE html>
<html><body>500</body></html>

Exact message: Found EOF while looking for a key name (check your syntax) at line 2,30 >>><html><body>500</bod ...

Fix: Check the HTTP status and the Content-Type header before parsing. Log the first 200 characters of the body when parsing fails so the actual page is visible in your logs.

What other parsers say about the same input

If a colleague reports a different message for what looks like the same file, this is why.

Parser Message for the same inputs
CPython json.loadsExpecting value: line L column C (char N)
GsonUse JsonReader.setLenient(true) to accept malformed JSON at line L column C path $…
Gson JsonParser (lenient off)Use JsonReader.setLenient(true) to accept malformed JSON at line L column C path $…
JSON5JSON5: invalid character '<' at 1:1
JSON::PPmalformed JSON string, neither array, object, number, string or atom, at character offset N (before "…")
Jackson ObjectMapperUnexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
JavaScriptCore JSON.parseJSON Parse error: Unrecognized token '<'
Newtonsoft.Json JsonConvertUnexpected character encountered while parsing value: <. Path '', line L, position N.
Newtonsoft.Json JsonTextReaderUnexpected character encountered while parsing value: <. Path '', line L, position N.
Ruby JSON.parseunexpected token at '…'
SpiderMonkey JSON.parseJSON.parse: unexpected character at line L column C of the JSON data
System.Text.Json Deserialize'<' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.
System.Text.Json JsonDocument'<' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.
V8 JSON.parseUnexpected token '<', "…"... is not valid JSON
encoding/json Unmarshalinvalid character '<' looking for beginning of value
json-bigintUnexpected '<'
json_decodeSyntax error
orjsonunexpected character, expected a JSON value: line L column C (char N)
serde_json::from_strexpected value at line L column C
ujsonExpected object or value

← All JSON parser errors

Standards this registry is checked against

Only standards bodies and peer-reviewed venues are cited. Error strings on this site are observed by executing each parser; the standards above define what the parser is reacting to.