🌳 AST Explorer
Parse code in 10+ languages and explore the syntax tree. Select nodes, see their properties.
About this tool
An Abstract Syntax Tree (AST) is the structured, hierarchical representation of source code that compilers, interpreters, and tools use internally. Every function, variable, expression, and statement becomes a node in the tree.
Example: paste function add(a, b) { return a + b; } and set the language to JavaScript. The tree shows a program root containing a function_declaration node with identifier, formal_parameters, and statement_block.
Use it to debug why a linter flags something, learn how different languages represent the same construct, or understand parser behavior before writing a codemod.
FAQ
What is an AST? ›
An Abstract Syntax Tree is a tree-shaped representation of source code where each node stands for a language construct such as function declarations, loops, and operators.
What languages are supported? ›
JavaScript (including JSX), TypeScript, Python, Rust, Go, JSON, CSS, HTML, Bash, and C. Each language uses a dedicated tree-sitter grammar loaded as WebAssembly.
Does my code leave my machine? ›
No. Parsing runs entirely in the browser using tree-sitter compiled to WebAssembly. No source code is sent to a server.
Why do I see ERROR nodes? ›
Tree-sitter is error-tolerant and will attempt to parse even broken code, marking unparseable sections as ERROR nodes.