Pick an explanation style - a developer overview, a step-by-step walkthrough, or plain English for someone who cannot read code - and copy the result with one click.
How to explain a code snippet in your browser
- Paste your code into the box. A sample snippet is preloaded so you can see the output shape first.
- Read the instant structure outline - the language guess, function and class names, imports, and loop and conditional counts appear with no download at all.
- Choose the explanation style: developer overview, step-by-step walkthrough, or plain English.
- For a full explanation, load a code-tuned on-device model (the download size is shown before it starts, and the model is cached for later visits) - or, in browsers that ship built-in AI, the page uses that with zero download.
- Press Explain code and copy the result. The code stays on your device the whole time.
AI Code Explainer - Understand Code Without Uploading It
Paste a code snippet and this page explains what it does - as a developer overview, a step-by-step walkthrough, or plain English. Everything runs inside your browser: the code is never uploaded, so a proprietary function or a client's script is safe to paste here.
Three ways the page can run
The moment the page loads you get something useful with no download at all: a structure outline that reads the code directly - the likely language, every named function and class, the imports, and how many loops and conditionals it contains. In browsers that ship built-in AI, the page uses that for full explanations with zero download. Everywhere else you can load a small code-tuned model (the Qwen 2.5 Coder family) into the browser itself: the download size is shown before anything starts, and the model is cached so later visits skip the wait. A status line under the button always names which of the three produced the answer on screen.
Pick the style that matches the reader
The developer overview names the language, the inputs, the outputs, and any side effects in a few sentences - the fastest way to size up an unfamiliar function during a code review. The step-by-step walkthrough goes through the code in the order it runs, one short bullet per block, which helps when you inherit a script and need to trace exactly what happens. Plain English drops the jargon entirely, so you can hand the explanation to a teammate who does not read code.
Honest about its limits
The on-device models are small (0.5 to 3 billion parameters). They are solid on snippets and single files, and they are told to ground every statement in the pasted code - but a small model can still misread intent, so verify anything critical against the code itself. Input longer than 8000 characters is truncated on the model path, and the page says so when it happens. The tool explains code; it does not run, lint, debug, or fix it.
Private by construction
There is no server behind the page - on every tier the code stays on your device. Once a model has been downloaded and cached, explanations keep working without a network connection, and the cached model is shared with the other on-device AI tools on this site, so it is a one-time cost. A cache-clear button removes the downloaded files whenever you want the disk space back.
When another page fits the job better
If the thing you are trying to understand is a JSON payload rather than program code, the JSON Parser and Formatter renders it as an expandable tree with validation, which answers structure questions faster than prose. To edit code with highlighting and run quick experiments, open the Code Editor.
Frequently Asked Questions
Does my code leave the browser?
No. There is no server behind this page. The instant structure outline is computed in the page itself, the optional AI model is downloaded into the browser and runs on your device, and browsers with built-in AI run it on-device too. On every path the pasted code stays on your machine.
What do I get without downloading a model?
A structure outline that is read directly from the code: the likely language, the names of functions and classes, the imports, and how many loops and conditionals it contains. It lists structure only - for an explanation of what the code actually does, load the on-device model or use a browser with built-in AI.
Which models can I load, and how big are they?
The picker offers the Qwen 2.5 Coder family in three sizes (0.5B, 1.5B, and 3B parameters; the 1.5B is the default). The exact download size is read from the model list and shown before the download starts. Models are cached in the browser, so later visits load from disk, and the cache is shared with the other on-device AI tools on this site.
How much code can I paste?
On the model path, input is capped at 8000 characters to fit the small model's context; longer input is truncated and the result is labeled to say so. The no-model structure outline has no such cap.
Which programming languages does it handle?
The code-tuned models are trained on many common languages. The no-model outline is narrower: its language guess and name extraction recognize JavaScript, TypeScript, Python, Java, C and C++, Go, Rust, PHP, SQL, HTML, and CSS - for anything else it still counts lines honestly and says the language was not recognized.
Can it run, debug, or fix my code?
No. It explains the code you paste - what it does, step by step, or in plain English. It does not execute anything, does not lint, and does not propose fixes.
How reliable are the explanations?
The on-device models are small (0.5-3B parameters) and are instructed to describe only what the pasted code shows. They are solid on snippets and single files, but a small model can still misread intent - treat the output as a fast first read and verify anything critical against the code itself.
Does it work offline?
The structure outline always works offline. Model-based explanations work offline once the model has been downloaded and cached; the first load of a model needs a connection.