Find syntax errors in JavaScript before you run or ship it.
Loading tool…
The validator compiles your code with your browser's JavaScript engine, the same one that would run it, so the syntax check is exact for modern JavaScript: arrow functions, classes, async/await, optional chaining and more. The code is compiled but never executed. It also points out eval() calls, console statements and likely missing semicolons.
Check copied code compiles before pasting it into your project.
Validate a script you edited on a server without a full build setup.
See the exact error message when a beginner's code won't run.
No. It is only compiled to check the syntax; nothing in it runs.
Whatever your browser supports, which in current browsers means modern JavaScript including classes, async/await, optional chaining and template literals.
No. The code is checked as a regular script, so import and export statements are reported as errors even when they are valid in a module. Remove them to check the rest of the file.
No. It finds syntax errors, plus a few warnings (eval, console, missing semicolons). Undefined variables and wrong logic only show up when the code runs, so use a linter such as ESLint and tests for those.
No. Everything runs in your browser; nothing you paste or upload is sent to our servers.