A categorized reference of canonical SQL injection payloads for authorized testing and WAF/detection engineering.
Use responsibly — authorized testing only. Use this tool only on systems you own, a written engagement with a defined scope, or a lab or CTF you are allowed to attack. Keep that written permission next to your notes before you start. Unauthorized access is illegal in most jurisdictions — legal responsibility for what you run sits with you, not with this page. The tool is provided as-is, with no warranty.
SQL injection (SQLi) happens when user input is concatenated into a SQL query instead of being passed as a bound parameter, letting an attacker change the query's meaning. This reference collects the canonical, widely-documented payloads — the same ones every scanner and WAF already recognizes — organized by technique, so you can reproduce findings during authorized testing and, just as importantly, build and validate detections.
The techniques. Authentication bypass payloads like ' OR '1'='1 turn a login WHERE clause always-true. UNION-based payloads append a second SELECT to exfiltrate data once you know the column count and types. Blind injection is used when the app returns no data or errors: boolean-based payloads compare a true condition against a false one by watching response differences, and time-based payloads (SLEEP(5), WAITFOR DELAY) infer data from response latency. Error-based payloads coax the database into leaking data inside an error message.
How you'll use it. Pick a category to see representative payloads with a note on what each does. Use them to confirm a suspected injection point in a target you are authorized to test, to understand a payload you found in logs, or to write and test WAF rules and IDS signatures against known-bad strings.
The honest caveat. These are reference strings, not a turnkey exploit — real exploitation depends on the database engine, the query context (string vs numeric, inside a LIKE, etc.), quoting, and any filtering. That context-sensitivity is exactly why manual verification matters.
Defensive angle — the actual fix. The definitive defense is parameterized queries / prepared statements, which send the query structure and the data separately so input can never change the query's meaning. Add least-privilege database accounts (so a compromised query cannot read every table), input allowlisting where the value space is known, and an ORM used correctly. A WAF that blocks these strings is a useful speed bump and detection layer, but it is not a substitute for parameterization — attackers routinely URL- or hex-encode and mutate payloads to slip past signatures. Injection rarely travels alone: pair this reference with the XSS payload reference when reviewing an input that reaches both a query and a page.
Usage notes (authorized testing). Browse the canonical payloads by category only against apps you own, a written penetration-test scope, a bug-bounty program that allows the test, or a local lab (for example DVWA); written permission and a defined scope come first. Confirm the injection point and the database role are in scope, pick a category that matches the technique you are verifying (authentication bypass, UNION-based, blind, error-based) — these are the same well-known strings scanners and WAFs already list — and use a payload to confirm a finding or to tune a detection rule, adapting quoting to the real query context; this page does not invent new exploit chains. Prefer a local lab when you are learning: see the DVWA SQL injection tutorial for a safe practice path, and keep a Kali Live USB handy for portable labs — boot Kali without installing. Updated October 18, 2026.
Detection & Defense. Fix it with parameterized queries / prepared statements so user data never changes query structure, paired with least-privilege database accounts and input allowlisting where the value space is known. Alert on classic auth-bypass and UNION shapes in query logs, on unexpected SLEEP/WAITFOR latency, and on database errors returned to clients, and feed these reference strings into WAF/IDS tests — then remember encoding and mutation will bypass signature-only rules. A WAF is a speed bump, not the fix; review any input that also reaches HTML with the XSS payload reference.
Generate copy-ready reverse-shell one-liners for bash, netcat, python, perl, php, ruby and PowerShell — plus the matching listener command. Enter your listener host (LHOST) and port (LPORT), pick a shell, and paste the payload on a system you're authorized to test. Everything runs in your browser; nothing is sent to a server.
A categorized reference of cross-site scripting payloads for authorized testing, filter evaluation, and detection.