Skip to content
MixTool

JavaScript validator

Find JavaScript syntax errors in seconds — and check whether code runs in older browsers.

  • Runs entirely in your browser
  • Free · no sign-up
  • Works on phone and desktop
Loading tool…

Pinpoint syntax errors

Paste your code and it's parsed with Acorn, a standards-compliant JavaScript parser. If there's a syntax error, you'll see its exact line and column with the line shown, instead of a vague browser console message.

Choose the ECMAScript version — Latest, ES2020, ES2015 or ES5 — to check whether code will run in older browsers, and whether to parse it as a module or a script. The validator also points out debugger statements, eval() calls, loose == comparisons and leftover console calls.

How to validate JavaScript

  1. 1

    Paste your code

    Any script or module.

  2. 2

    Choose the version

    Latest, or older for compatibility.

  3. 3

    Click Validate

    Fix any reported line.

Key features

  • Exact error positions

    Line and column.

  • Version targeting

    ES5 to the latest standard.

  • Code-quality hints

    debugger, eval and loose equality.

  • Private

    Runs in your browser.

Common uses

  • Debugging: Find the missing bracket or comma.
  • Legacy support: Check code works in old browsers.
  • Reviewing snippets: Validate code from tutorials and forums.

Tips and good to know

  • TypeScript and JSX aren't plain JavaScript; compile them first or expect errors.
  • Make minified code readable with the JavaScript Beautifier.

Frequently asked questions

What does “Unexpected token” mean?

The parser found a character it didn't expect at that position — often a missing comma, bracket or quote just before it.

How do I check if code works in Internet Explorer?

Choose ES5. Arrow functions, let/const, classes and template literals will be flagged.

Does it run my code?

No. It only parses the code, so nothing executes.