How to use this prompt
- Paste your code into the "Code to explain" box. A single function or file works best.
- Choose your experience level and explanation style, and tick any extras like an example run or a quiz.
- Click Generate prompt, then Copy prompt or open it in ChatGPT, Claude, Gemini, Copilot, Perplexity, Grok or any AI app.
- Ask follow-ups in the same chat: "Explain line 12 again, simpler", "Why not use a for loop here?" or "Show me how to test this".
Long code? If your prompt is too long to open directly in an app, the button copies it and you just paste it (Ctrl / Cmd + V).
Tips for learning faster
- Never paste passwords, API keys or private customer data. Replace them with placeholders like
YOUR_API_KEYfirst. - Paste the smallest piece of code that confuses you, not the whole project. The explanation will be clearer.
- Tick Step-by-step example run. Seeing real values flow through the code is the fastest way to understand it.
- Use the Quiz extra, then try changing the code yourself and ask the AI to check your change.
Example: how to fill it in
Here is how a beginner might fill in the form to understand a piece of JavaScript.
| Field | Example answer |
|---|---|
| Code to explain | A 30-line JavaScript function copied from a tutorial |
| Programming language | JavaScript |
| Framework or library | React |
| What you want to understand | What useEffect does and why it runs twice |
| Your experience level | Beginner |
| Explanation style | Line by line |
Common mistakes and how to fix them
- Pasting code with secrets. Remove API keys, passwords and private URLs before pasting any code.
- No context. Say what the code is for. The same code can mean different things in different projects.
- Pasting a whole project. Paste the part you do not understand. Long code makes the explanation less clear.
- Not asking why. Ask why the code is written this way, not only what it does.
Follow-up prompts to try
After the first result, keep the same chat open and send one of these:
- "Add comments to the code to explain each part."
- "How could this code be written more simply?"
- "Give me a small exercise to practise this concept."
- "What could go wrong with this code?"
Frequently asked questions
Which languages does it support?
Python, JavaScript, TypeScript, PHP, Java, C#, SQL and many more.
Can it explain code to non-programmers?
Yes. Choose the beginner level and plain-language style.
Is it safe to paste my code?
Remove secrets and follow your company's rules on sharing code with AI tools.
Can it fix bugs too?
For bugs, the Bug Finder and Fixer prompt on this site is more focused.
