ExtraTools/js-validator

PROGRAMMER TOOLS · JAVASCRIPT · ECMASCRIPT 2026

LOCAL JAVASCRIPT VALIDATOR

Check JavaScript syntax and legacy patterns
Utilities for code and web development.

Validate JavaScript against ECMAScript 2026 (Edition 17) with exact parser locations and a focused code excerpt. Paste code or open a local .js, .mjs, or .cjs file; Cyrillic, English, and Unicode source text are supported.

Choose browser/AJAX script, ES module, Node.js CommonJS, or Node.js ES module context. The validator parses your source locally in a browser worker; it does not execute code, send AJAX requests, or upload your source.

The report also flags selected legacy or deprecated language features and APIs. These checks are deliberately limited: they do not prove browser compatibility, runtime behavior, code quality, or that a reported API name is not a custom property.

01 / JAVASCRIPT

JavaScript source

Paste a script or open a local JavaScript file. Maximum source size: 400,000 UTF-16 code units in the editor and 1 MB per file.

Select the syntax context for parsing. This does not execute code or load Node.js/browser APIs.

Load an example

Paste code, then run validation.

REPORT

Validation results

Run the parser to see syntax errors and selected legacy-pattern warnings.

What this JavaScript validator checks

The local parser checks JavaScript syntax for the selected source context; additional static rules report a small set of legacy patterns.

  • The parser checks ECMAScript 2026 syntax and reports precise source positions.
  • Automatic parsing recognizes browser scripts, ECMAScript modules, and top-level await; explicit contexts are available for browser scripts, Node.js CommonJS, and Node.js ES modules.
  • Selected warnings cover legacy octal escapes and literals, Annex B HTML-like comments and with statements, and APIs such as substr(), escape(), and unescape().
  • Findings include line and column numbers, a code frame, and a control to move the editor to the reported source location.
  • The parser runs from a locally hosted JavaScript module in a Web Worker. No build service, Node.js runtime, external parser CDN, or server-side code processing is required.
  • JavaScript source is never executed, evaluated, or sent to the server. AJAX examples are only parsed as source.

Standards, method, and limits

  1. ECMAScript 2026 / Edition 17 is the syntax target. Syntax validation is not a complete implementation of the ECMAScript specification or a JavaScript runtime.
  2. Browser/AJAX code uses ordinary script parsing; network APIs are neither called nor checked. Node.js modes model syntax context only and do not verify installed Node APIs, package versions, or module resolution.
  3. Legacy findings are limited static hints, not a complete deprecation database. Some findings can refer to an application-defined method or identifier with the same name.
  4. Passing syntax checks does not prove that the program runs, is secure, follows a style guide, or works in a particular browser or Node.js release.
  5. The parser runs locally. Usage tracking sends only a fixed action key and random visitor identifier, never source code or findings.

ECMAScript 2026 · Edition 17

Your JavaScript source, filename, and diagnostics stay in this browser.

Frequently asked questions

What does the JavaScript validator check?

It parses JavaScript syntax targeting ECMAScript 2026 and reports the line and column of a syntax error. It also flags a limited set of legacy constructs and APIs.

Does the validator execute pasted JavaScript?

No. The source is parsed by a local parser in a Web Worker; it is not executed and cannot access the page.

Can it validate AJAX and fetch code?

Yes. Code using fetch(), XMLHttpRequest, and other network APIs is parsed as ordinary browser JavaScript. No network request from your code is sent.

Which mode should I choose for Node.js?

Choose Node.js CommonJS for require() and module.exports. Choose Node.js ES module for import/export and Node module code. The mode changes parsing only; it does not run Node.js.

Is top-level await supported?

Yes, in ECMAScript module and Node.js ES module modes. Top-level await may be invalid in browser-script or Node.js CommonJS context.

How do I read an error location?

Line and column numbers start at one. Each finding includes a source excerpt and marker; select “Go to source location” to move the editor to the reported position.

Which deprecated or legacy patterns are detected?

Selected patterns include legacy octal escapes and numbers, Annex B comments, with, String.prototype.substr(), escape()/unescape(), getYear(), and some RegExp properties. This is not a complete deprecation database.

Can a warning be a false positive?

Yes. For example, your code may define its own property named substr or function named escape. A warning is a prompt to review context, not a claim about a specific object’s behavior.

Does the validator mark var as deprecated?

No. var remains valid ECMAScript syntax and is not reported as a standards error. The tool does not enforce a let/const style preference.

Can I validate TypeScript or JSX?

No. This validator accepts JavaScript, not TypeScript or JSX syntax extensions. Transpile that source first or use a tool designed for those languages.

Are the source code or local filename sent to a server?

No. The file is read on your device, and source is sent only to a local Web Worker. Action tracking sends only a fixed action key and random visitor identifier.

Does a passing check guarantee that code will run?

No. A successful parse confirms syntax only for the selected context. It does not check API availability, package versions, module resolution, runtime behavior, security, or support in a particular browser.

How to use the JavaScript validator

Paste JavaScript or open a local source file, choose the code context when needed, and run the check. Diagnostics appear without reloading the page.

Your JavaScript source, filename, and diagnostics stay in this browser.

Could not validate JavaScript