JavaScript Validator

Paste your JavaScript to check it for syntax errors. Code is parsed, never executed.

How this JavaScript checker works

The validator parses your code with Acorn, the same standards-compliant parser used by popular tools such as webpack and ESLint. It understands the latest ECMAScript syntax, including arrow functions, classes, async/await, optional chaining, private fields and top-level await in modules.

Your code is only parsed, never run, so it is safe to check any snippet.

Typical JavaScript syntax errors

  • Missing closing bracket }, parenthesis ) or square bracket ]
  • Unterminated string or template literal
  • Using import/export without selecting “ES Module”
  • Reserved words used as variable names (e.g. let class = 1)
  • Using await outside an async function in a regular script

Does it check for logic errors?

No — this is a syntax validator. Code can be syntactically valid and still contain bugs, so test it in your environment as well.

Related tools