JavaScript AST Explorer
Inspect syntax-node types and source ranges in a JavaScript script or module.
Loading tool…
How to use JavaScript AST Explorer
Inspect syntax-node types and source ranges in a JavaScript script or module. Acorn parses an explicit ECMAScript2022 grammar and an iterative walk emits indexed node paths, types and original start/end offsets. The report shows structure without evaluating expressions or loading imports.
- Provide javascript source.
- Choose the supported mode and run the tool. Review its assumptions and any reported errors.
- Copy the result or download a separate output; reset to clear the current form.
Good to know
- 50,000 source characters;10 seconds to load the worker/libraries, then2 seconds to compute. The worker is terminated on success, failure or timeout.
- Output is untrusted source text: it is never executed or inserted into this page. No linked resources or source maps are fetched.
- At most30,000 nodes and100 nesting levels; reports can hit the500,000-character output cap sooner. This is syntax inspection, not type checking, linting or a security verdict.
- Inputs are processed on this device and are not automatically saved or uploaded.
Common questions
What do start and end mean?
They are zero-based UTF-16 source offsets. End is exclusive, so source.slice(start,end) selects the original spelling, including any escape sequences.
Does this change my original input?
No. The tool returns a separate result. Review that output before using it in another application.
Keep going with related tools
All developer →JavaScript Formatter and Minifier
Format JavaScript or compact parsed script/module source without executing it.
DeveloperStatic Module Dependency Graph
Map supplied JavaScript modules, unresolved imports and dependency cycles locally.
DeveloperSource Map Explorer
Decode basic version3 source maps and inspect generated/original mapping anchors.
DeveloperWebAssembly Binary Inspector
Inspect selected WebAssembly section ranges, imports, exports and declared memory limits without execution.