Prompt to explain code with ChatGPT
Paste a script, a function or a macro you do not understand: the AI explains what it does, step by step, at your level, and flags any risks.
Your prompt
🔒 The fields stay in your browser. The prompt is only sent to the AI service you choose to open.
How do I get ChatGPT to explain code?
Paste the code into a prompt that states the language and your level, then ask for a step-by-step explanation: overall purpose, how each block works, concepts used, inputs and outputs, points to watch. The Lunyce prompt prepares this request; remove passwords and API keys before pasting the code.
How to use it
- Enter the language and your level, and paste the code to explain.
- Copy the prompt or open it in ChatGPT, Claude or Mistral.
- Ask follow-up questions about anything still unclear, for example "explain line 3 with an example".
Tips for better results
- Remove passwords, API keys and server addresses from the code before pasting it into an online AI.
- If you do not know the language, write "I don't know": the AI will recognise it.
- For a long file, paste one function at a time.
Can ChatGPT explain any programming language?
It knows most common languages (Python, JavaScript, PHP, SQL, VBA, Excel formulas…). For very specialised or recent code, its explanations may be approximate: always test before relying on them.