● runs entirely in your browser

Code Explainer

Paste a function or snippet in any common language. The structural breakdown below is instant, deterministic, and always accurate about what it detects — no download, no AI, no upload. There's also an optional experimental AI mode further down if you want a plain-English summary attempt.

🧪 Try AI explanation (experimental, on-device)

Downloads a real small AI model to your device and asks it to summarize the code in plain English. Click to expand.

⚠️ Experimental. This downloads and runs a genuine (small) AI model locally in your browser — it never uploads your code anywhere. Small models can misread or invent details, especially on long, obscure, or multi-file code. Treat the summary as a starting point, not ground truth, and always sanity-check anything important. The structural breakdown above is more reliable for exact facts.

Not loaded yet. First load downloads the model once; it's cached by your browser after that.

How it works

The structural breakdown is pure pattern matching — language detection scores your code against regex signals for keywords like "def", "func", or "console.log", function names are pulled with per-language regexes, and the complexity number is a simplified cyclomatic estimate (1 plus the count of loops and conditional branches). The optional AI mode is a real small language model (Qwen2.5-Coder, 0.5B or 1.5B parameters) downloaded via transformers.js and run locally with WebGPU or WebAssembly — nothing you paste is ever uploaded, even in AI mode.

FAQ

How accurate is the complexity estimate?
It's a rough proxy, not real cyclomatic complexity — it just adds up regex matches for loops and conditionals, so it can be thrown off by code in comments or strings, or by control-flow patterns the regex doesn't recognize.
Does the AI mode send my code to a server?
No — it downloads an open-source model file (roughly 555MB or 1.3GB depending on which you pick) to your browser once, then runs inference locally using WebGPU if available or WebAssembly otherwise; your code never leaves your device even with AI mode on.

Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.

Say thanks — $3