appuyez sur ⌘K pour changer d’outil
VALIDATE & INSPECT

Validateur de Syntaxe JavaScript

Valide les erreurs de syntaxe JavaScript.

local
js-validator

Syntax is checked by compiling in your browser. The code is never executed and never sent anywhere.

§01 À PROPOS DE CET OUTIL

Overview

This tool answers one question fast: will this JavaScript parse? Your code is handed to the browser’s own engine via the Function constructor, which compiles it without ever running it. That means the verdict comes from a real production parser — the same one that will execute your script — not a reimplementation, and side effects are impossible because the compiled function is never invoked.

How to use

  1. Paste code into the JavaScript field — checking runs on every keystroke.
  2. Read the status line: No syntax errors on success, or the engine’s error such as SyntaxError: Unexpected token '}' on failure.

Examples

  • const x = () => { return 1 }No syntax errors
  • if (a { console.log(a) }SyntaxError: Unexpected token '{'
  • function f( {SyntaxError: Unexpected end of input

Notes

The code is compiled in your browser and never executed or sent anywhere. Because it is parsed as a function body rather than a module, import/export statements and top-level await are reported as errors even if the file is a valid ES module. This is a syntax check only — it will not catch runtime errors, undefined variables, or logic bugs; use a linter such as ESLint for deeper analysis.

FAQ
Is my code executed or sent to a server?
Neither. The code is compiled with the Function constructor — parsed but never called — and everything happens in your browser. Nothing is executed, uploaded, or stored.
Which JavaScript version does it support?
Whatever your browser's engine supports. A modern Chrome, Firefox, or Safari parses current ECMAScript, including arrow functions, optional chaining, and classes — results match exactly what that browser would accept.
Why does import or export fail even though my file is valid?
The code is compiled as a function body, not as an ES module. import/export declarations and other module-only syntax are rejected in that context, so strip them or test the file's logic without them.