How to explain code with AI

Paste your code and get a clear explanation pitched at your level in seconds.

Getting started

  1. 1Pick an explanation modeExplain a Fragment, What a Line Does, Explain an Error, Explain a Regex, Explain SQL, or Annotate Code — the mode decides which settings show up next.
  2. 2Paste your codeCopy in the piece you need explained — from a single line to a whole file, depending on the mode.
  3. 3Set your level and what you want to knowPick who the explanation is for and what to focus on — these and the remaining settings are explained in detail below.
  4. 4Click "Explain code"iBro breaks down the code based on the mode, your level, and every setting you picked.

Tool settings

Reader level

Who the explanation is for: Never Coded, Beginner, I Know Another Language (you can name which one), or Experienced — Just the Gist. This shapes the whole explanation.

Depth

How thorough the breakdown is: The Gist in 3 Sentences, Block-by-Block Overview, or Line by Line. The line-by-line option is only available for short enough snippets.

Focus

What to emphasize: What It Does, How It Works Internally, Why It's Written This Way, or Where the Problems Are.

Regex flavor

The regex engine — JavaScript or PCRE, for example. Shown only in Explain a Regex mode, since the flavor decides what's even valid in the pattern.

SQL dialect

The database the query is written for — PostgreSQL or MySQL, for example. Shown only in Explain SQL mode.

Error context

The surrounding code or file the error came out of — paste it so the explanation can see the full picture, not just the stack trace. Available in Explain an Error mode.

Explanation language

The language the explanation itself is written in — it doesn't have to match the code's own language.

Terminology

How to handle technical terms: keep them as is, spell out what each one means, or avoid jargon entirely.

Analogies

Turns on explaining through everyday comparisons — unavailable in Annotate Code mode, where the notes already sit line by line next to the code.

The mode decides which settings are available — Focus and Analogies, for example, don't show up in every mode.
"I Know Another Language" is the single most useful level setting: one line naming a familiar language changes the explanation a lot.
Back to the tool
How to get an AI explanation of code — a guide by iBro