Use Copilot to explain code you found online in plain English
Paste any snippet into Copilot Chat and get a line-by-line breakdown so you can decide if it's safe to run.
In short: Paste any code snippet you don't understand into Copilot Chat, ask it to explain each line in plain English, and follow up with safety questions before you run the code. You need a GitHub account and a Copilot plan (free tier, paid, or a free education/open-source seat). Copilot can describe what code is meant to do, but it can't actually run it for you.
Found a code snippet in a tutorial and have no idea what it does? Copilot Chat can translate it into plain English, line by line, so you can decide whether to actually run it. This guide walks you through the exact questions to ask, in the order that works best for a complete beginner.
💡 Tip: tap a step’s number when you finish it — a green tick appears and your browser remembers how far you got.
- A GitHub account (free to create at github.com — just an email and a password).
- A Copilot plan. There's a free tier with a limited number of chats, paid plans for heavier use, and free seats for verified students and open-source maintainers. If you're unsure, sign in and look for the "Try Copilot" prompt — it will tell you which plan you're on.
- A web browser (Chrome, Firefox, Edge, or Safari). If you prefer, you can do the same thing in VS Code with the Copilot extension installed, but this guide sticks to the web.
- A code snippet to test with — keep a tutorial, blog, or Stack Overflow answer open in another tab.
- About 5–10 minutes.
Open Copilot Chat in your browser
Head to github.com and sign in. Once you're on the home page, look for a Copilot icon in the top navigation bar — it usually looks like a small spark or chat bubble. Click it, and a chat panel slides open from the side of the page. If you don't see the icon, try the profile menu (your avatar) in the top-right and look for a "Copilot" or "Try Copilot" link. On a paid plan you get generous chat limits; on the free tier you may get a small number of chats per month.
You'll know it worked when a chat box appears at the bottom of the panel with a prompt like "Ask Copilot" or "Type a message."

Paste the code snippet into the chat
Go back to the page where you found the code. Select the snippet with your mouse, copy it (Ctrl+C on Windows, Cmd+C on Mac), then click into the Copilot chat box and paste it (Ctrl+V / Cmd+V). The text appears as a code block — a grey box with monospaced font — so it's easy to read. If the snippet is very long, paste only the first 10–20 lines first; you can always add more later. Don't paste any secrets like API keys, passwords, or private tokens — replace those with placeholders such as "YOUR_API_KEY" first.
You'll know it worked when the code shows up formatted in the chat, with the assistant waiting below for your next message.

Ask for a plain-English explanation
Now type a clear instruction in the chat box. The trick is to say exactly what you want and how you want it explained — a line-by-line breakdown is usually the most useful starting point. After you press Enter, Copilot writes back a multi-paragraph explanation right in the same chat. If instead you get more code, rephrase your prompt to start with the word "Explain..." rather than "What is this..."
You'll know it worked when Copilot describes what each line does in everyday words, not technical jargon — and ideally gives a one-sentence summary at the top.

Drill into the parts you still don't get
Read Copilot's answer and pick the one sentence that's still confusing. Type a new question that points at exactly that part — the more specific you are, the better the answer. If the explanation still uses words you don't know, ask for an analogy. Each follow-up sits in the same chat, so you can scroll up to see the full conversation and Copilot remembers what you already asked.
You'll know it worked when you can summarize the snippet in your own words to a friend without looking back at the chat.

Ask about safety before you run it
Now the important question: should you actually use this code? Type a new prompt asking Copilot to flag risks. It can't actually run the code for you, but it can spot common things to check — hardcoded URLs, missing error handling, dependencies you might not have installed, or commands that delete files. Treat its answer as a starting checklist, not a guarantee; you still need to test in a safe place like an online playground or a throwaway folder.
You'll know it worked when Copilot names at least one concrete thing to check, like a library you'd need to install or a permission it requires.

Save the explanation for later
Hover over Copilot's answer and look for a small copy icon (two overlapping squares) at the top-right of the message. Click it to copy the whole reply, then paste it into a note app, a Google Doc, or an email to yourself. If there's no copy button, just select the text with your mouse and copy it the normal way. Saving now means you can come back to the explanation later without re-asking the same questions — and you have a record of what the snippet does in case you forget.
You'll know it worked when you can open your notes app and read the explanation back, with the original code snippet included.

- Asking without context. If you just paste code and type "what is this?", Copilot guesses at your skill level and may give an answer full of jargon. The fix: tell it up front that you're a beginner — the example phrase in Step 3 works well.
- Trusting the explanation as proof of safety. Copilot can confidently misread code, and it can't actually test it for you. The fix: always run unfamiliar snippets in a sandbox, a throwaway folder, or a free online playground like replit.com before using them on real files.
- Pasting private information. API keys, passwords, customer names, or your company's internal code shouldn't go into any AI chat. The fix: replace sensitive values with placeholders like
"YOUR_API_KEY"or"<redacted>"before you copy the snippet.
Open github.com, find any beginner Python tutorial (the official Python wiki has a "Hello, World" example), copy the first line of code, and ask Copilot: "What does this do, in one sentence?" That's it — one snippet, one sentence, one answer. You've just made Copilot your tutor.
❓ Quick questions
How long does this take?
About 7 minutes — the guide has 6 steps, and you can tick each one off as you go.
Which tool do I need?
This guide uses GitHub GitHub Copilot — but the approach works very similarly in other AI assistants.
Do I need to prepare anything?
- A GitHub account (free to create at github.com — just an email and a password).
- A Copilot plan. There's a free tier with a limited number of chats, paid plans for heavier use, and free seats for verified students and open-source maintainers. If you're unsure, sign in and look for the "Try Copilot" prompt — it will tell you which plan you're on.
- A web browser (Chrome, Firefox, Edge, or Safari). If you prefer, you can do the same thing in VS Code with the Copilot extension installed, but this guide sticks to the web.
- A code snippet to test with — keep a tutorial, blog, or Stack Overflow answer open in another tab.
- About 5–10 minutes.
What mistakes should I avoid?
- Asking without context. If you just paste code and type "what is this?", Copilot guesses at your skill level and may give an answer full of jargon. The fix: tell it up front that you're a beginner — the example phrase in Step 3 works well.
- Trusting the explanation as proof of safety. Copilot can confidently misread code, and it can't actually test it for you. The fix: always run unfamiliar snippets in a sandbox, a throwaway folder, or a free online playground like replit.com before using them on real files.
- Pasting private information. API keys, passwords, customer names, or your company's internal code shouldn't go into any AI chat. The fix: replace sensitive values with placeholders like
"YOUR_API_KEY"or"<redacted>"before you copy the snippet.
Keep reading
✦ Original step-by-step guide by AI World HQ's AI editorial team. Written in plain language, reviewed for accuracy.
← Back to all stories