Searchlight
Tools
BlogAbout
Free SEO Audit
Back to home
๐Ÿ“ˆSEO & Analytics
๐Ÿ—‚๏ธText & Data
๐Ÿ”Encoders & Decoders
โšกGenerators
๐Ÿ”„Converters
๐Ÿ–ผ๏ธImage Tools
๐Ÿ“„PDF Tools
๐Ÿ’ปCode Tools
Syntax HighlighterCode ScreenshotJS ObfuscatorPython RunnerJS SandboxSQL PlaygroundMarkdown EditorAST ExplorerJSON to TypesAPI Mock GeneratorHTTP Status Codes
๐Ÿ”Regex & Parsing
๐ŸงฎCalculators
๐Ÿ—บ๏ธDiagrams
๐ŸŒNetwork & Web
โœ๏ธText Utilities
๐ŸŽจColor Tools
๐Ÿ”€Diff & Compare
148+ tools. OAuth is read-only.
Searchlight

148+ free SEO, developer, image, PDF, and productivity tools - no account needed.

Free ยท all tools included
Company
  • Blog
  • About
  • Free SEO Audit
Legal
  • Privacy Policy
  • Terms of Service
  • Cookie Policy

ยฉ 2026 Searchlight. All rights reserved.

Read-only OAuth ยท No data reselling ยท Completely free

AST Explorer

Parse JavaScript into its Abstract Syntax Tree and explore every node interactively.

JavaScript Input
AST Output

Click "Parse AST" to explore the syntax tree


About this tool

Paste JavaScript, TypeScript, CSS, HTML, or JSON code and explore its Abstract Syntax Tree (AST) interactively. Click any node in the tree to highlight the corresponding source code. Choose from multiple parsers including Babel, Acorn, TypeScript, and PostCSS. Indispensable for writing codemods, ESLint rules, Babel plugins, and understanding how parsers work.

How to Explore a JavaScript AST

  1. 1Paste your code into the left panel.
  2. 2Select the language and parser from the dropdown menus.
  3. 3The AST tree appears on the right - expand nodes to explore.
  4. 4Click any node in the tree to highlight the corresponding source code.
  5. 5Click source code to jump to that node in the tree.

Frequently Asked Questions

What is an Abstract Syntax Tree (AST)?+
An AST is a tree representation of source code's structure. Each node represents a syntactic construct - function declarations, variable assignments, expressions. Compilers, linters, and formatters all work by manipulating ASTs rather than raw text.
Which parsers are available?+
JavaScript/TypeScript: Babel, Acorn, Esprima, TypeScript compiler. CSS: PostCSS, CSSTree. HTML: parse5. JSON: built-in. Each parser has slightly different node types and property names.
How do I use AST Explorer for writing ESLint rules?+
Paste the code you want to lint, find the node type in the AST, and use that node type as the key in your rule's visitor object. The node's properties become what you check and report.
What is a codemod?+
A codemod is a script that transforms source code by manipulating its AST rather than using regex. Tools like jscodeshift use ASTs to safely rename variables, change API calls, or restructure code across an entire codebase.
Looking for a deeper guide on this topic? Browse the Searchlight blog.
Visit the blog โ†’

Related tools

View all Code Tools โ†’
Syntax HighlighterHighlight JS / TS / Python / Go / RustCode ScreenshotBeautiful code screenshots (Carbon-style)JS ObfuscatorObfuscate JavaScript codePython RunnerRun Python in the browser (Pyodide)