• Free
  • Private: runs in your browser
  • JavaScript + Python

Error Message Decoder

Paste the error exactly as your browser console, Node.js or Python printed it. The decoder recognises the messages people search for most, including the different wording Chrome, Firefox and Safari use for the same mistake.

Error Message Decoder

Runs in your browser · nothing is uploaded
Try one:

Matches are made with patterns written from our JavaScript errors and Python errors guides. No server, no AI, no logging.

The decoder needs JavaScript. Every error it recognises is listed below.

How to read an error before you paste it#

Every JavaScript error has three parts: the type (TypeError, ReferenceError, SyntaxError, RangeError), the message, and a stack trace. Python tracebacks are read bottom-up: the last line holds the exception type and message, and the frames above it show where it was raised. In both languages, the type narrows the cause before you read anything else.

If the type is…It usually meansGuide
TypeErrorThe value exists but is the wrong kind for the operation (often undefined or None)JS · Python
ReferenceError / NameErrorA name can’t be found: a typo, a missing import, or the wrong scopeJS · Python
SyntaxErrorThe code (or the JSON) can’t be parsed; look at the line above the one reportedJS · Python
RangeError / RecursionErrorUsually runaway recursion with no reachable base caseJS · Python

Why it runs in your browser#

Stack traces often include file paths, internal hostnames and snippets of data. The decoder never sends what you paste anywhere: it compares your text against a list of patterns, each written from a section of our JavaScript errors and Python errors guides, and shows you the matching explanation. If the error came from a network request, check the status code first; the HTTP status code explorer explains every registered one.

Every error the decoder recognises

  • Access to fetch has been blocked by CORS policy JavaScript
    The request often did reach the server; the browser just refused to let your script read the response. For security reasons the details are not available to JavaScript, so your catch only sees a generic network failure. Fix it →
  • SyntaxError: Unexpected end of JSON input JavaScript
    JSON.parse or response.json() threw because the text isn't strict JSON. An empty string is not valid JSON. Fix it →
  • SyntaxError: "[object Object]" is not valid JSON JavaScript
    JSON.parse or response.json() threw because the text isn't strict JSON. An object was converted to the string "[object Object]" and then parsed. Fix it →
  • SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON JavaScript
    JSON.parse or response.json() threw because the text isn't strict JSON. The text starts with <, which means an HTML page (often an error page) was parsed as JSON. Fix it →
  • SyntaxError: Expected double-quoted property name in JSON (and other JSON.parse errors) JavaScript
    JSON.parse or response.json() threw because the text isn't strict JSON. Firefox prefixes these messages with JSON.parse:. Fix it →
  • TypeError: Cannot read properties of undefined (reading 'x') JavaScript
    You read a property, or called a method, on something that turned out to be undefined or null. The property name in the message is the one you were reading; the thing that was undefined is whatever sits to its left. Fix it →
  • TypeError: undefined is not an object (Safari) JavaScript
    This is Safari's wording for reading a property of undefined or null. You read a property, or called a method, on something that turned out to be undefined or null. Fix it →
  • TypeError: "x" is undefined (Firefox) JavaScript
    This is Firefox's wording for reading a property of undefined or null. You read a property, or called a method, on something that turned out to be undefined or null. Fix it →
  • TypeError: x is not a function JavaScript
    You put () after something that isn't callable. All three engines use essentially the same wording. Fix it →
  • TypeError: Assignment to constant variable JavaScript
    const makes the binding read-only, not the value. Changing obj.foo on a const obj is fine; writing obj = {} is not. Fix it →
  • IndentationError / TabError Python
    In Python, indentation is syntax: the interpreter uses it to decide which lines belong to a block. TabError is a subclass of IndentationError, which is itself a SyntaxError. Fix it →
  • SyntaxError: Missing parentheses in call to 'print' Python
    This is the classic Python 2 habit: print "hi" is a statement in Python 2 but a syntax error in Python 3. Fix it →
  • SyntaxError (Python) Python
    The parser couldn't read the code. Since Python 3.10 the message usually explains itself, for example '(' was never closed or expected ':'. Fix it →
  • NameError: name 'x' is not defined. Did you forget to import 'x'? Python
    A NameError is raised when a local or global name is not found. Here the name is a module you used without importing it. Fix it →
  • NameError: name 'x' is not defined Python
    A NameError is raised when a local or global name is not found. Fix it →
  • UnboundLocalError: cannot access local variable Python
    If a function assigns to a name anywhere in its body, Python treats that name as local for the whole function, so a read like count += 1 happens before any local value exists. Fix it →
  • TypeError: 'NoneType' object is not subscriptable Python
    You indexed into None. NoneType errors usually trace back to a function that returned None. Fix it →
  • TypeError: unsupported operand type(s) for +: 'int' and 'str' Python
    An operation was applied to an object of inappropriate type, here an operator used on two types that don't support it together. Fix it →
  • TypeError: can only concatenate str (not "int") to str Python
    An operation was applied to an object of inappropriate type: you tried to join a str and a non-str with +. Fix it →
  • TypeError: 'int' object is not callable Python
    You called something that isn't a function. Fix it →
  • AttributeError: 'NoneType' object has no attribute 'x' Python
    The value is None, so it has none of the attributes you expected. This plays the role of JavaScript's Cannot read properties of undefined. Fix it →
  • AttributeError: object has no attribute Python
    An attribute lookup or assignment failed. Either the method belongs to another type (Python lists use append, not JavaScript's push) or the value is None. Fix it →
  • KeyError Python
    A dict key is missing. KeyError is a LookupError subclass. Fix it →
  • IndexError: list index out of range Python
    A sequence index is out of range. IndexError is a LookupError subclass. Fix it →
  • ValueError Python
    The argument had the right type but an unusable value. User input and file parsing are the usual sources. Fix it →
  • ModuleNotFoundError: No module named 'x' Python
    The package isn't installed for the interpreter that's running your code. Machines often have several Pythons, and a bare pip may belong to a different one. Fix it →
  • ZeroDivisionError: division by zero Python
    Division or modulo by zero. Fix it →
  • RecursionError: maximum recursion depth exceeded Python
    The recursion depth passed sys.getrecursionlimit(), which is 1000 by default on CPython. Fix it →
  • ReferenceError: Cannot access 'x' before initialization JavaScript
    This is the temporal dead zone: let, const and class declarations are hoisted but stay uninitialized until the declaration line runs, and touching them before then throws. Fix it →
  • ReferenceError: x is not defined JavaScript
    The name was never declared anywhere the current code can see. Fix it →
  • SyntaxError: Unexpected token JavaScript
    The parser hit a character it couldn't fit into valid grammar. The reported position is often after the real mistake. Fix it →
  • RangeError: Maximum call stack size exceeded JavaScript
    Too many function calls were nested at once. Fix it →
  • Uncaught (in promise) JavaScript
    A promise rejected and nothing handled the rejection. Browsers log it after Uncaught (in promise); since Node.js v15 an unhandled rejection is raised as an uncaught exception and stops the process. Fix it →
  • TypeError (Python) Python
    A TypeError means an operation was applied to an object of inappropriate type. Fix it →
  • Python exception Python
    This is a Python traceback. The last line names the exception type and message. Fix it →
  • TypeError (JavaScript) JavaScript
    A JavaScript TypeError means the value exists but is the wrong kind for the operation. Fix it →

Frequently asked questions

Does the decoder send my error message anywhere?

No. Matching happens in your browser with a list of patterns written from our guides. Nothing you paste leaves the page, which matters because stack traces can contain file paths, URLs and other internal details.

Why does Chrome say "Cannot read properties of undefined" when Safari says "undefined is not an object"?

They are the same error. Each JavaScript engine words its messages differently: V8 (Chrome, Edge, Node.js), SpiderMonkey (Firefox) and JavaScriptCore (Safari). The decoder knows all three wordings and sends them to the same explanation.

Which part of a Python traceback should I paste?

The last line is the most important: it holds the exception type and message. Pasting the whole traceback is fine; the decoder looks for the exception line wherever it is.

What if my error isn't recognised?

The decoder covers the most common JavaScript and Python errors. For anything else, read the error type first (TypeError, ReferenceError, SyntaxError, and so on); the tables at the top of our JavaScript and Python guides explain what each type means.

Is "Unexpected token '<'" a JavaScript bug?

Usually not. It means JSON.parse or response.json() received text starting with <, almost always an HTML error page, login redirect or 404 instead of JSON. Check the HTTP status code and Content-Type before parsing.

Sources

Every factual claim on this page links to one of these. Checked October 2026. See how we source.

  1. MDN: JavaScript error reference developer.mozilla.org
  2. MDN: TypeError: "x" is undefined / can't access property developer.mozilla.org
  3. MDN: SyntaxError: JSON.parse: bad parsing developer.mozilla.org
  4. MDN: CORS errors developer.mozilla.org
  5. Python docs: Built-in Exceptions docs.python.org
  6. Python docs: What's New in Python 3.10 (Better error messages) docs.python.org
  7. Python docs: What's New in Python 3.12 (Improved error messages) docs.python.org