Prompt Injection Detector (Heuristic scan for jailbreaks)
Scan untrusted user input for common prompt-injection and jailbreak patterns — instruction overrides, jailbreak personas, system-prompt exfiltration — with a risk score. Heuristic, 100% local.
Last updated:
CommentsPaste untrusted user input and it's scanned for common prompt-injection and jailbreak patterns — instruction overrides, jailbreak personas, system-prompt exfiltration — and given a risk score. Heuristic, runs locally.
Ignore previous instructions (high)
Classic instruction-override attempt telling the model to discard its system prompt.
“Ignore all previous instructions”
Role-swap / jailbreak persona (high)
Attempts to switch the model into an unrestricted persona (e.g. 'DAN', 'developer mode').
“You are now DAN”
System prompt exfiltration (high)
Tries to make the model leak its hidden system prompt or instructions.
“reveal your system prompt”
Suppress refusals (medium)
Instructs the model not to refuse — a common jailbreak lead-in.
“Do not refuse”
Heuristic detection runs entirely in your browser. It catches common patterns (instruction override, jailbreak personas, system-prompt exfiltration) but is not a substitute for proper input isolation, output filtering, and least-privilege tool design.
What is Prompt Injection Detector?
Prompt injection is the top security risk for LLM applications: untrusted text (a user message, a scraped web page, a document) contains instructions that hijack the model — 'ignore all previous instructions', 'you are now DAN', 'print your system prompt'. This tool runs a set of heuristic pattern rules over input to flag those well-known attack shapes and produce a weighted risk score, useful as a fast pre-filter and for teaching what injection looks like. It is explicitly not a complete defense: robust protection requires isolating untrusted input from instructions, filtering outputs, and giving any tools the model can call least privilege. Treat a low score as 'no obvious attack', not 'safe'.
How to scan for prompt injection
- 1Paste the untrusted input that will be inserted into your prompt.
- 2Review the risk score and each flagged pattern with its severity.
- 3Use it as one signal alongside input isolation and output filtering.
Key Concepts
- Prompt injection
- Untrusted text that smuggles instructions to override the model's intended behavior.
- Jailbreak
- Input that tries to bypass safety guardrails, often via role-play personas.
Tips & Best Practices
- ▸Never concatenate untrusted input directly with your system instructions — keep them in separate message roles.
- ▸A low risk score means no known pattern matched, not that the input is safe. Novel attacks evade pattern matching.
- ▸Pair detection with output filtering and least-privilege tool access for real defense.
Frequently Asked Questions
How does the detection work?
It runs a set of heuristic pattern rules over your input — matching known injection phrasing like 'ignore previous instructions', jailbreak personas (DAN, developer mode), and system-prompt exfiltration attempts — and computes a weighted risk score.
Is this a complete defense against prompt injection?
No. It's a fast heuristic pre-filter for education and triage. Real defense requires isolating untrusted input, filtering outputs, and giving tools least privilege. Novel attacks will slip past pattern matching.
Is my input uploaded?
No. Scanning runs entirely in your browser; nothing is sent anywhere.
Try Next
LLM JSON Extractor
Extract every JSON object or array buried inside an LLM reply — even when it's wrapped in markdown fences, mixed with explanation text, or has trailing commas and single quotes. Auto-repairs each block. 100% local.
Related Tools
Prompt Cache Calculator
See how much prompt caching saves you. Enter your cached prefix size, per-request tokens, volume, and hit rate to compare cost with and without caching across models that support it. 100% local.
Batch API Cost Calculator
Compare real-time vs Batch API cost for a bulk job. Enter request count and per-request tokens to see how much the ~50% batch discount saves across models that support it. 100% local.
Text Chunker
Split long text into overlapping chunks for embedding and RAG pipelines. Preview recursive, paragraph, sentence, or fixed strategies with live token counts. Runs 100% in your browser.
Cosine Similarity
Compute cosine similarity, dot product, and Euclidean distance between two vectors online. Perfect for debugging LLM embeddings, semantic search, and RAG pipelines. 100% local — vectors never leave your browser.
AI Cost Calculator
Estimate monthly LLM API cost across GPT-4o, Claude 3.5, Gemini, DeepSeek and 100+ models. Compare providers side-by-side with prompt-caching and batch discounts. Free, no signup — prices refreshed daily from the public LiteLLM catalog.
Token Counter
Count tokens in your prompt for GPT-4, GPT-3.5, Claude, and Gemini and predict API cost before you spend. Free, no signup — all counting runs locally, your prompt stays in your browser.