Most people who want to learn hacking hit the same wall in week one: every tutorial assumes you already know what a SQL query is, how a cookie works, and why a browser trusts one site but not another. Hacksplaining is one of the gentlest ways over that wall. It is a free site where you watch, and then perform, real web attacks in short animated lessons, each one about the length of a coffee break. If you want to feel what an attack is like before you even open a lesson, try the free Hack the Login lab: you break into a login page using nothing but your browser.
This guide explains what Hacksplaining is, what is free, how a lesson works, which lessons to take first, and where it falls short if your goal is ethical hacking or CTFs rather than writing safer code. Most of its lessons map to the OWASP Top 10, so it also works as a friendly first tour of the web's most common vulnerabilities.
TL;DR: Hacksplaining is a free, browser-based platform with 45 interactive lessons on web vulnerabilities such as SQL injection, XSS and CSRF, plus newer LLM attacks. Each lesson takes 15 to 30 minutes and pairs a guided attack with the code that fixes it. It is the best free "what is this attack, really?" resource for beginners, but its labs are scripted, so you will need open-ended labs and CTFs to learn to find bugs on your own.
What Is Hacksplaining?
Hacksplaining is a free online training site that teaches web security through short interactive lessons. In each lesson you play the attacker against a fake website, watch the vulnerability unfold in animations, then learn how developers prevent it with secure code examples in languages like Python, JavaScript, Java and Go.
The site is written by Malcolm McDonald, its founder and editor-in-chief, who also wrote the Manning book Grokking Web Application Security. It has been around for a decade: a 2016 i-programmer article already described it as a site where you "hack" a test site and see the vulnerability in animated graphics. Today the homepage claims more than 500,000 registered learners (as of July 2026).
One thing to know up front: Hacksplaining's real audience is software developers. Its tagline is "Learn the attacks. Defend your code," and companies pay for it as secure coding training. That does not make it less useful for aspiring hackers. Understanding why code breaks is exactly what makes a good pentester. It just explains the tone: every lesson ends with how to fix the bug, not how to go further with it.
What the Lessons Cover
The lesson catalog lists 45 lessons, filterable by OWASP Top 10, PCI DSS and LLM. Grouped the way a beginner should think about them:
- Injection classics: SQL injection, command execution, remote code execution, XML external entities, XML bombs and regex injection.
- Browser-side attacks: stored, reflected and DOM-based XSS, cross-site script inclusion, CSRF, clickjacking, CSS injection, CORS and open redirects.
- Login and access flaws: broken access control, privilege escalation, user enumeration, session fixation, weak session IDs, password mismanagement and mass assignment.
- Infrastructure and network: SSRF, directory traversal, file upload vulnerabilities, DNS poisoning, SSL stripping, downgrade attacks, subdomain squatting, email spoofing and denial of service.
- LLM and AI: prompt injection, sensitive information disclosure, model poisoning and slopsquatting, the newer attack where hackers register package names that AI coding tools hallucinate.
Is Hacksplaining Free?
Yes, for individuals. Hacksplaining's own FAQ says it "is free for personal use" and that only team features (dashboards, team progress tracking and compliance reports) are paid. You can preview any lesson without an account, but you need a free account to start the interactive lab. Sign-up takes an email address, or a Google, GitHub or Microsoft login.
Here is what you get at each level, checked on the site in October 2026:
- No account: lesson previews, the written explanation of each vulnerability, and the glossary.
- Free account: all 45 interactive labs, the prevention guides, quizzes, and progress tracking across lessons.
- Team plan ($50 per user per year): admin dashboards, a custom curriculum, SSO, API access, and certificates and compliance reports for PCI DSS and ISO 27001. There is a 14-day free trial with no credit card.
- Self-hosted: SCORM lessons for a company's own learning platform, priced through sales.
As a learner, you will never need the paid plans. They exist for companies that have to prove to an auditor that their developers did security training.
How a Hacksplaining Lesson Works
Every lesson page starts with three small ratings (how common the bug is, how easy it is to exploit, and how bad the impact is), a short definition, and the OWASP Top 10 and PCI DSS requirements it relates to. Then come the three parts that matter:
- The interactive lab: a simulated website where you carry out the attack step by step. The lesson tells you what to do at each stage and animates what happens on the server.
- The prevention guide: the same bug from the developer's side, with vulnerable and fixed code next to each other.
- The quiz: two or three questions. Passing marks the lesson as complete in your progress tracker.
Lessons also use a recurring cast of characters, such as the Savant, the Cowboy and the Hacker, who stand in for different kinds of attackers. It sounds gimmicky. In practice, it is what makes the lessons memorable: you remember the stored XSS lesson as "the one where Mal, the lesson's attacker, ruins a bakers' forum", and the details come back with it.
Walkthrough: The SQL Injection Lesson
The SQL injection lesson is where almost everyone starts, and it shows the Hacksplaining style well. You attack a login form backed by a real database running in your browser:
- Break it: you type a single quote
'into the password field. The app crashes. - Read the error: the lesson shows you the server log, where a SQL syntax error reveals that your input landed inside a query.
- See the code: you look at the vulnerable code that builds the query by gluing strings together.
- Exploit it: you enter
' or 1=1--as the password and log in without knowing it.
Why that works: the query ends up as something like ... WHERE password = '' or 1=1--'. Since 1=1 is always true, the database returns a user, and -- comments out the rest of the line. The prevention guide then shows the fix, parameterized statements, which Hacksplaining calls "the most reliable defense". In Python that is the difference between building a query with an f-string and passing the value separately to cursor.execute().
That single lesson teaches the three habits every hacker uses daily: poke an input with a special character, read the error carefully, and reason about what the code behind it must look like. For the techniques that come next, such as UNION queries and blind injection, our PortSwigger Web Security Academy guide covers the free platform that goes much deeper.
Which Hacksplaining Lessons to Start With
The catalog is not ordered for beginners. It is alphabetical, with the newest lessons on top, so it is easy to land on buffer overflows or DNS poisoning first and get lost. Here is the order we recommend for someone who wants to learn ethical hacking. It takes three to four hours in total, so about a week of lunch breaks:
- SQL Injection: the cleanest example of "my input changed what the server does". Start here.
- Cross-Site Scripting: the stored XSS lesson. You watch a script hidden in a forum comment run in another user's browser and hand over their cookies.
- Reflected XSS: the same idea delivered through a link instead of a saved comment.
- Cross-Site Request Forgery: how a malicious page makes your browser perform actions on a site you are logged in to.
- Directory Traversal: reading files the server never meant to share, using
../. Short, and it sticks forever. - Command Execution: your first taste of running operating system commands through a web form.
- Broken Access Control: the bug class ranked first in the OWASP Top 10:2025. Changing an ID in a URL is often all it takes.
- User Enumeration: how a login page leaks which usernames exist through tiny differences in its error messages.
After those eight, pick by curiosity. SSRF and file upload are the most useful for CTFs. Prompt injection is worth 20 minutes if you are curious about AI security. Skip the infrastructure lessons (DNS poisoning, SSL stripping, downgrade attacks) until later: they are interesting background, but you cannot practice them in a beginner lab yet.
Tip: do not rush the prevention guides. Reading the fixed version of the code is how you learn to spot the broken version in a CTF, where you often get the source code and have to find the one line that is wrong.
Is Hacksplaining Good for Learning Ethical Hacking?
Yes, as a first step. No other free resource explains web attacks as clearly in so little time. But it is a first step, not a full path, and it helps to know its limits before you spend weeks on it.
What it does very well:
- Mental models: the animations show the request, the server and the database at once, which is exactly what beginners cannot picture on their own.
- Zero setup: no virtual machine, no proxy, no VPN. A browser and 20 minutes are enough.
- Both sides of the bug: you see the attack and the fix. That makes you a better hacker, and a much better candidate in a job interview.
- Accuracy: lessons are written by a human expert and updated regularly. The SQL injection and XSS lessons were both marked "Updated Sep 2026" when we checked.
Where it falls short for hackers:
- The labs are on rails: the lesson tells you where the bug is and often what to type. You never have to find anything, which is the actual job.
- No real tools: you never use Burp Suite, a terminal or a browser's DevTools, which you need from your very first CTF.
- No difficulty curve: every lesson sits at roughly the same beginner level. There is no "now try a harder version".
- No flags or points: nothing rewards you for going off script, and there is no competition element.
Our take: use Hacksplaining for what it is great at, understanding an attack in 20 minutes, then immediately go and exploit the same bug somewhere that does not hold your hand. Read the SQL injection lesson, then go find a SQL injection yourself the same evening. That pairing is far more effective than finishing all 45 lessons before touching a real target.
Hacksplaining vs Other Free Ways to Learn Web Hacking
Hacksplaining is often mentioned alongside a few other platforms. They do different jobs, and knowing which is which saves you time:
| Feature | Hacksplaining | PortSwigger Academy | OWASP Juice Shop | HackerDNA |
|---|---|---|---|---|
| Cost | Free for personal use | Free | Free, open source | Free tier, Pro for full catalog |
| Setup | Browser only | Browser + free Burp download | Run it yourself with Docker or Node.js | Browser only, no VPN |
| Teaching style | Animated story, then the fix | Detailed written lesson per lab | Hints and a companion guide | Guided courses plus an AI hacking coach |
| Do you find the bug yourself? | No, steps are scripted | Bug class named, you find where | Yes, from a score board | Yes, user and root flags |
| Real tools | None needed | Burp Suite | Browser, Burp, anything | Browser, terminal, Burp |
| Best for | Understanding an attack in 20 minutes | Learning each bug class deeply | Hunting unlabeled bugs | CTF-style targets with guidance |
They fit together in a natural order. Hacksplaining explains the idea. The PortSwigger Academy teaches the technique properly with Burp Suite. OWASP Juice Shop drops you into one big app where nothing is labeled. CTF-style labs then make you chain everything together: recon, exploitation, and sometimes privilege escalation, until you capture a flag.
When testing real applications, it is the last two that matter most. Real bugs never announce themselves. The sooner you practice on targets that do not tell you what is wrong, the sooner the lessons turn into skill.
From Hacksplaining to Your First CTF
Here is a concrete four-week plan that turns Hacksplaining lessons into hands-on skill, at about three to four hours a week:
- Week 1, understand: do the eight lessons above, including every quiz. Write one sentence per lesson in your own words explaining why the attack works.
- Week 2, reproduce: for SQL injection and XSS, exploit the same bug in a lab that does not script the steps. Our XSS Playground lab is a community message board with a stored XSS bug, the same scenario as Hacksplaining's forum lesson, except you write the payload and steal the admin's session yourself.
- Week 3, learn the tools: install Burp Suite Community Edition and redo week 2 with every request going through the proxy. This is the step Hacksplaining cannot teach.
- Week 4, play: pick a beginner web CTF challenge and solve it with no walkthrough for the first hour. Getting stuck is part of the training.
By the end of the month, you will have gone from watching an animation of ' or 1=1-- to finding injections yourself. That jump, from understanding to doing, is what every CTF player and pentester had to make.
Legal and Ethical Considerations
Critical reminder: Always get explicit written authorization before testing any system. Hacksplaining's labs are simulations, which makes it easy to forget that the same steps against a real website are illegal.
- Simulated is not permission: typing
' or 1=1--into a real login page "just to see if the lesson works" is unauthorized access in most countries, even if nothing happens. - Practice where you are invited: use platforms built to be attacked (Hacksplaining, PortSwigger, Juice Shop, CTF labs) or bug bounty programs with a written scope.
- Respect the platform: the attack happens inside the lesson. Do not scan, fuzz or attack hacksplaining.com itself.
- Use the defensive half: if you find one of these bugs in software you use, report it to the owner responsibly instead of testing further.
Frequently Asked Questions
Is Hacksplaining free?
Yes. Hacksplaining is free for personal use: all 45 lessons, labs, prevention guides and quizzes are available with a free account. Only the team plan, at $50 per user per year, is paid. It adds admin dashboards, SSO and compliance reports for companies.
Is Hacksplaining safe and legit?
Yes. Hacksplaining has run since at least 2016, is written by Malcolm McDonald, author of Grokking Web Application Security, and is used by companies for developer training. All attacks happen in simulated sites inside the lesson, so you are not hacking anything real.
Do I need to know how to code to use Hacksplaining?
Not much. Hacksplaining says that if you can write basic code, you can follow along. Complete beginners can still do the interactive labs, but the prevention guides are much easier to follow if you can read a few lines of Python or JavaScript.
How long does Hacksplaining take?
Each lesson takes 15 to 30 minutes, with most around 20 minutes. Doing all 45 lessons takes roughly 15 hours. For ethical hacking, the eight core lessons on injection, XSS, CSRF, traversal, access control and user enumeration take three to four hours.
Is Hacksplaining enough to start doing CTFs?
It is enough to understand the most common web vulnerabilities, but not to solve CTF challenges on its own. Hacksplaining labs tell you where the bug is. In a CTF you have to find it, usually with tools like Burp Suite. Pair each lesson with an open-ended lab on the same bug.
Does Hacksplaining give a certificate?
Certificates and compliance reports are part of the paid team plan, aimed at companies proving secure coding training to auditors. Individual learners on the free account get progress tracking and quiz completion, but not a formal certificate.
Last verified: October 2026. Lesson count, "free for personal use" statement, lesson length and learner count checked on the Hacksplaining homepage and lesson catalog. Team pricing, trial terms and compliance frameworks checked on Hacksplaining's teams page. SQL injection and XSS lesson steps checked on their lesson pages.
Your Next Steps
Hacksplaining is the friendliest free place to understand how web attacks work, and you can finish your first lesson in less time than it takes to install a virtual machine. Create a free account, do the SQL injection lesson tonight, and work through the eight-lesson route above during the week.
Then take the training wheels off. Practice the same attacks on targets that do not tell you where the bug is: start with the free Hack the Login lab, then work through HackerDNA's Web Application Attacks course, which covers every bug class from your Hacksplaining lessons with hands-on labs at the end of each chapter. Start with HackerDNA's free tier - no credit card required, and every lab runs in your browser.
Part of the OWASP Top 10 series
Related articles: