Code Inspector — Explain & Analyze Code
Paste code and find out what it is. The Code Inspector detects the language, classifies the constructs (functions, loops, recursion, arrays…), estimates time complexity (Big-O), runs it, flags issues like loose equality and possible infinite loops, explains in plain language what it does, and routes you to the right Utilities Bunker tool. It is File Inspector / Math Inspector, but for code. Everything runs in your browser.
How to Use
- Paste any code into the box — JavaScript is analysed in depth; other languages (Python, SQL, HTML, CSS, JSON) are identified and routed to the right tool.
- Press <strong>Inspect</strong>. You get a plain-language <strong>summary</strong>, the detected <strong>language</strong>, a <strong>complexity (Big-O)</strong> estimate, a breakdown of <strong>constructs</strong>, any <strong>issues</strong>, and the program's <strong>output</strong>.
- Read the <strong>recursion</strong> and <strong>complexity</strong> notes — they explain why the code is fast or slow (nested loops, exponential recursion, etc.).
- Click <strong>Visualize this</strong> to step through it line by line, or open a linked <strong>Bunker tool</strong> for anything the code touches (JSON, regex, hashing, color, bases…).
- Use <strong>Copy report</strong> to keep the full analysis. Nothing you paste is uploaded.
File Inspector, but for code. Paste a snippet and the Inspector tells you what language it is, what it does in plain language, its time complexity, the constructs inside, any issues — and runs it. JavaScript and Python are analysed in depth. Then it points you to the right Bunker tool. Nothing is uploaded.
What it reports
The front door to the Code Lab
The Inspector tells you what a piece of code is; the Execution Visualizer shows you how it runs; the Lessons teach you to write it. And because it lives inside Utilities Bunker, whatever your code touches — JSON, regex, hashing, color, number bases — the matching tool is one click away.
About the Code Inspector — Explain & Analyze Code
The Code Inspector — Explain & Analyze Code is a free tool for everyday tasks. It runs right in your web browser, so there is nothing to download. Paste code and find out what it is. The Code Inspector detects the language, classifies the constructs (functions, loops, recursion, arrays…), estimates time complexity (Big-O), runs it, flags issues like loose equality and possible infinite loops, explains in plain language what it does, and routes you to the right Utilities Bunker tool. It is File Inspector / Math Inspector, but for code. Everything runs in your browser.
How it works
Enter what you have and read the result as it updates live. It all runs on your own device, so it is quick and private, with nothing to install.
Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.
Frequently Asked Questions
What does it actually analyse?
For JavaScript it parses your code into a syntax tree and inspects it: how many functions / loops / conditionals, the maximum loop nesting, whether any function is recursive (and whether it recurses more than once), which array methods you use, and more. From that it estimates Big-O, writes a plain-language summary, flags common issues, and runs the code to show its output.
How does it estimate Big-O?
From structure: a single loop over the input is O(n), two nested loops are O(n²), and a function that calls itself more than once (like naive Fibonacci) is exponential O(2ⁿ) unless memoized. It's a teaching estimate based on the code shape, not a formal proof — but it's right for the common cases and explains <em>why</em>.
Does it run my code?
For JavaScript in the supported subset, yes — locally, in your browser, using the same engine as the Execution Visualizer, and it shows the output. Nothing is uploaded.
What about Python, SQL, or other languages?
It detects them and points you to the matching Utilities Bunker tool (e.g. SQL → SQL Viewer, JSON → JSON Viewer). Deep construct-level analysis currently covers JavaScript; more languages are on the Code Lab roadmap.
How is this different from the Execution Visualizer?
The visualizer shows you <em>how</em> code runs, step by step. The Inspector tells you <em>what</em> the code is — its shape, cost and issues — at a glance, and then hands you off to the visualizer or the right tool. It's the front door.
How do I use the Code Inspector — Explain & Analyze Code?
Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Is it free? Does it work without internet?
Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.
Where does my data go?
Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.
Common Use Cases
Understand a snippet
Paste unfamiliar code and get a plain-language explanation.
Spot slow code
See O(n²) nested loops or exponential recursion before it bites.
Catch issues
Flag loose equality, var usage and possible infinite loops.
Identify a language
Not sure what something is? Get a confident guess.
Route to the right tool
Jump to the Bunker tool the code touches.
Last updated: