The 10 Best LLM Guardrails and Safety Tools in 2027
By Kory White · Updated Nov 2026 · 6 min read
Direct answer
Amazon Bedrock Guardrails is the best LLM guardrail tool: six safeguard policies cover prompt attacks, PII, toxic content and hallucinations for any model, at published per-text-unit prices. NVIDIA NeMo Guardrails is #2 as the best open-source toolkit, and Azure AI Content Safety Prompt Shields is #3. The OpenAI Moderation API is the free pick.
Jailbreak and injection detection, PII masking, input/output moderation, fact-checking and hallucination detection, plus NVIDIA content safety and topic safety models
Engineering teams that want programmable, self-hosted rails around RAG apps, chatbots and tool calls
Prompt Shields for user prompt attacks and document (indirect) attacks, harm categories (sexual, violence, hate, self-harm) in text and images, groundedness detection (preview), protected material and agent task adherence
Azure and Foundry teams that need to catch direct and indirect prompt injection
Direct and indirect prompt attacks including jailbreaks and prompt injections, content moderation, data leakage (PII and system prompt leaks), malicious links and agent behavior
Security teams that want a dedicated prompt-attack and data-leak firewall with a free starter plan
Input and output guards built from Guardrails Hub validators, such as toxic language, competitor mentions and regex checks; the company says its runtime guardrails detect policy violations, hallucinations and data leakage
Python developers who want to stack small, single-purpose validators on LLM inputs and outputs
Unsafe prompts and responses across 14 hazard categories based on the MLCommons taxonomy, including violent crimes, hate, privacy, self-harm, elections and code interpreter abuse
Teams that want an open-weight safety classifier for text and images
Harmful content in text and images, with categories such as harassment, hate, illicit, self-harm, sexual and violence
Any app that needs a free first-pass toxicity filter
Pick by what you want
Best overall
Amazon Bedrock Guardrails
Best open source
NVIDIA NeMo Guardrails
Best prompt-injection shield
Azure AI Content Safety Prompt Shields
Biggest free tier
Google Cloud Model Armor
Best open-weight classifier
Meta Llama Guard 4
Free content filter
OpenAI Moderation API
The ranking
1
Amazon Bedrock Guardrails
Answrs VerdictThe broadest managed guardrail service, priced per 1,000 text units.
Detects: Six safeguard policies: content filters (hate, insults, sex, violence, misconduct), prompt attack detection (prompt injections and jailbreaks), denied topics, word filters, PII redaction, and hallucination detection through contextual grounding and Automated Reasoning checksDeployment: Managed AWS service that works across any foundation model, including models in Amazon Bedrock and self-hosted or third-party models such as OpenAI and Google GeminiPrice: Content filters and denied topics $0.15 per 1,000 text units; sensitive information filters and contextual grounding checks $0.10 per 1,000 text units; word filters and regex filters freeLower-cost API: With the InvokeGuardrailChecks API, content filters cost $0.07 and the prompt attack filter $0.08 per 1,000 text unitsVendor claim: AWS says it blocks up to 88% of harmful contentLicense: Proprietary managed service; not open source
Bedrock Guardrails has six safeguard policies: content filters, prompt attack detection, denied topics, word filters, PII redaction, and hallucination checks through contextual grounding and Automated Reasoning. It works with models outside Bedrock, including OpenAI and Gemini. Content filters cost $0.15 per 1,000 text units, or $0.07 through the InvokeGuardrailChecks API.
Go ifTeams that want every guardrail type (injection, PII, toxicity, hallucination) in one managed API with published prices
Skip ifYou must self-host your guardrails or avoid AWS
Why #1 over #2: It is a managed service with prices per text unit, while NeMo Guardrails is a toolkit you run yourself.
2
NVIDIA NeMo Guardrails
Answrs VerdictThe most complete open-source guardrails toolkit.
Detects: Jailbreak and injection detection, PII masking, input/output moderation, fact-checking and hallucination detection, plus NVIDIA content safety and topic safety modelsDeployment: Open-source Python toolkit (pip install nemoguardrails) or a guardrails server with an OpenAI-style /v1/chat/completions endpointRail types: Five rail types: input, dialog, retrieval, execution (tools) and output rails, written in the Colang modeling languageLicense: Apache License, Version 2.0Price: Free to self-host; you pay for the models and compute it calls
NeMo Guardrails is NVIDIA’s Apache 2.0 toolkit for programmable rails around an LLM. It ships jailbreak and injection detection, PII masking, moderation, fact-checking and hallucination rails, and it supports five rail types (input, dialog, retrieval, execution and output) written in Colang. You run it as a Python library or as a server.
Go ifEngineering teams that want programmable, self-hosted rails around RAG apps, chatbots and tool calls
Skip ifYou want a hosted API with no code to maintain
Why #2 over #3: It covers hallucination and PII rails, which Azure’s Prompt Shields do not.
3
Azure AI Content Safety Prompt Shields
Answrs VerdictThe strongest prompt-injection shields in a cloud API.
Detects: Prompt Shields for user prompt attacks and document (indirect) attacks, harm categories (sexual, violence, hate, self-harm) in text and images, groundedness detection (preview), protected material and agent task adherenceDeployment: Azure cloud API and Content Safety Studio, plus connected and disconnected containersPrice: Free tier of 5,000 text records per month; Standard $0.38 per 1,000 text records and $0.75 per 1,000 imagesNaming: Azure’s pricing page now lists the service as Content Safety in Foundry Control PlaneLanguages: Protected material, groundedness and custom categories (standard) work in English onlyLicense: Proprietary Microsoft service; not open source
Azure AI Content Safety pairs Prompt Shields, which catch user prompt attacks and hidden instructions in documents, with harm detection for text and images, groundedness detection in preview and protected material checks. The free tier covers 5,000 text records a month; Standard is $0.38 per 1,000 text records. The pricing page now calls it Content Safety in Foundry Control Plane.
Go ifAzure and Foundry teams that need to catch direct and indirect prompt injection
Skip ifYou need groundedness or protected-material checks in languages other than English
Why #3 over #4: It adds groundedness detection, which Model Armor’s product page does not list.
4
Google Cloud Model Armor
Answrs VerdictThe most generous free tier among cloud guardrails.
Detects: Prompt injection, jailbreaking, malicious URLs, malware, harmful content (hate speech, harassment, sexually explicit, dangerous) and PII through Sensitive Data ProtectionDeployment: REST API that protects any LLM (Gemini, OpenAI, Anthropic, Llama and more) on any cloud, plus no-code inline protection in Google Cloud servicesPrice: Free for up to 2 million tokens a month, then $0.10 per additional 1 million tokensMethod: Combines rules-based controls, ML models and AI reasoning models, with adjustable confidence thresholdsLicense: Proprietary Google Cloud service; not open source
Model Armor screens prompts, responses and agent interactions for prompt injection, jailbreaks, malicious URLs, malware, harmful content and PII. It is a REST API that works with any model on any cloud. It is free for up to 2 million tokens a month, then $0.10 per additional 1 million tokens.
Go ifTeams that want a model-agnostic AI firewall with a large free token allowance
Skip ifYou need hallucination or grounding checks
Why #4 over #5: It is free for up to 2 million tokens a month, while Lakera’s free Community plan stops at 10k requests a month.
5
Lakera Guard
Answrs VerdictThe specialist prompt-injection firewall, now part of Check Point.
Detects: Direct and indirect prompt attacks including jailbreaks and prompt injections, content moderation, data leakage (PII and system prompt leaks), malicious links and agent behaviorOwnership: Check Point closed its acquisition of Lakera on October 22, 2025; the docs now call the product Check Point AI GuardrailsPrice: Community plan $0 per month with 10k requests a month and an 8k-token maximum prompt; Enterprise is customDeployment: SaaS on Community; SaaS or self-hosted on EnterpriseCoverage: Says it observes 100+ languages in real time with sub-50 ms runtime latencyLicense: Proprietary; not open source
Lakera Guard detects direct and indirect prompt attacks, harmful content, PII and system prompt leaks, malicious links and risky agent actions. Check Point closed its acquisition of Lakera on October 22, 2025, and the docs now call it Check Point AI Guardrails. The Community plan is $0 a month for 10k requests; Enterprise adds self-hosting.
Go ifSecurity teams that want a dedicated prompt-attack and data-leak firewall with a free starter plan
Skip ifYou need an open-source tool you can modify
Why #5 over #6: It ships ready-made prompt-attack detection, while Guardrails AI asks you to assemble validators.
6
Guardrails AI
Answrs VerdictThe most popular validator framework, now owned by Harvey.
Detects: Input and output guards built from Guardrails Hub validators, such as toxic language, competitor mentions and regex checks; the company says its runtime guardrails detect policy violations, hallucinations and data leakageDeployment: Open-source Python framework (pip install guardrails-ai) that also generates structured data from LLMsLicense: Apache-2.0Ownership: Harvey announced its acquisition of Guardrails AI in September 2026Change: Validators are moving to standard PyPI packages and hosted remote inferencing is being discontinued, with a planned cutoff of August 25, 2026Price: Free and open source
Guardrails AI is an Apache-2.0 Python framework that runs input and output guards built from Guardrails Hub validators, such as toxic language and competitor checks, and also generates structured output. Harvey announced its acquisition of the company in September 2026. Validators are moving to standard PyPI packages, and hosted remote inferencing has a planned cutoff of August 25, 2026.
Go ifPython developers who want to stack small, single-purpose validators on LLM inputs and outputs
Skip ifYou relied on its hosted remote inferencing
Why #6 over #7: It checks many risk types through validators, while Llama Guard 4 is a single classifier.
7
Meta Llama Guard 4
Answrs VerdictThe leading open-weight content safety classifier.
Detects: Unsafe prompts and responses across 14 hazard categories based on the MLCommons taxonomy, including violent crimes, hate, privacy, self-harm, elections and code interpreter abuseModel: 12 billion parameter, natively multimodal safety classifier for text and multiple images that can run on a single GPUDeployment: Open weights you run yourself for input filtering, output filtering or both; Meta points to Llama Prompt Guard 2 for prompt attacksLicense: Llama 4 Community License; services with over 700 million monthly active users must request a license from MetaPrice: Free to download; you pay for your own GPUs
Llama Guard 4 is Meta’s 12 billion parameter safety classifier for text and multiple images. It flags unsafe prompts or responses across 14 hazard categories, from violent crimes to privacy and code interpreter abuse, and runs on a single GPU. It uses the Llama 4 Community License, and Meta points to Llama Prompt Guard 2 for prompt attacks.
Go ifTeams that want an open-weight safety classifier for text and images
Skip ifYou need prompt-injection detection from the same model
Why #7 over #8: It checks 14 hazard categories out of the box in text and images, while Granite Guardian leans on pre-baked criteria plus ones you write.
8
IBM Granite Guardian
Answrs VerdictThe best permissively licensed open-weight guard model.
Detects: Pre-baked criteria including jailbreak attempts, profanity, and hallucinations in RAG and agent tool calls, plus criteria you write yourselfModel: Granite Guardian 3.3 8b, a hybrid thinking model that can return reasoning traces or only a scoreDeployment: Open weights you run with Transformers, vLLM, SGLang or Docker Model RunnerLicense: Apache 2.0Price: Free to download; you pay for your own compute
Granite Guardian 3.3 8b is IBM’s Apache 2.0 judge model. Its pre-baked criteria cover jailbreak attempts, profanity and hallucinations in RAG answers and agent tool calls, and you can add your own criteria. It can return a reasoning trace or just a score, and runs on Transformers, vLLM or SGLang.
Go ifTeams that want an Apache-licensed judge model for jailbreaks and RAG hallucinations
Skip ifYou need PII redaction or a hosted API
Why #8 over #9: It is free open weights, while Cloudflare’s AI detection fields are an Enterprise paid add-on.
9
Cloudflare AI Security for Apps
Answrs VerdictEdge prompt filtering inside the WAF.
Detects: PII in prompts (phone numbers, emails, social security and credit card numbers), unsafe and custom topics, and prompt injectionNaming: AI Security for Apps was formerly called Firewall for AIDeployment: Built into the Cloudflare WAF and model-agnostic; it scans JSON requests to endpoints labeled cf-llmPrice: LLM endpoint discovery is on every plan; AI detection fields are a paid add-on on Enterprise onlyLicense: Managed Cloudflare service; not open source
Cloudflare AI Security for Apps, formerly Firewall for AI, runs inside the Cloudflare WAF. It scans JSON prompts sent to endpoints labeled cf-llm for PII, unsafe or custom topics and prompt injection, and you act on the results with WAF rules. Endpoint discovery is on every plan, but the AI detection fields are an Enterprise paid add-on.
Go ifCloudflare Enterprise customers who want to block bad prompts at the edge with WAF rules
Skip ifYou are not on Cloudflare Enterprise or need output checks
Why #9 over #10: It detects PII and prompt injection, which the OpenAI Moderation API does not.
10
OpenAI Moderation API
Answrs VerdictThe free content filter, not a full guardrail.
Detects: Harmful content in text and images, with categories such as harassment, hate, illicit, self-harm, sexual and violenceModel: omni-moderation-latest accepts text and image inputs (image files up to 20 MB) and does not classify audioDeployment: Hosted endpoint, or moderation scores returned inline with a Responses API generationPrice: The moderation endpoint is free to useLicense: Proprietary hosted API
The OpenAI Moderation API is free. Its omni-moderation-latest model scores text and images (up to 20 MB) for categories such as harassment, hate, illicit content, self-harm, sexual content and violence, and it can return scores inline with a Responses API call. It does not classify audio, and it is a content filter rather than an injection or PII guard.
Go ifAny app that needs a free first-pass toxicity filter
Skip ifYou need prompt-injection, PII or hallucination detection
How we ranked these
We ranked tools on how many risk types they detect (prompt injection, jailbreak, PII, toxicity and hallucination), whether they work with any model, whether pricing is published, and whether you can self-host them, using only vendor docs, pricing pages, model cards and GitHub. We left out Protect AI’s LLM Guard because its GitHub repository says the project has been archived, Patronus AI because its site now presents it as a behavioral research lab, and Arthur because its guardrails now ship inside the broader Arthur Engine monitoring and evaluation service. Facts are taken from each maker's own published information; check the official site before you buy.
Questions people ask
What is the best LLM guardrail tool in 2027?
Amazon Bedrock Guardrails is our top pick: its six safeguard policies cover content filters, prompt attacks, denied topics, word filters, PII redaction and hallucination checks, and it works with models outside Bedrock. NVIDIA NeMo Guardrails is the best open-source option, and Azure AI Content Safety is #3.
Which guardrail tools detect prompt injection?
Bedrock Guardrails, NeMo Guardrails, Azure Prompt Shields, Google Model Armor, Lakera Guard, Granite Guardian (jailbreaks) and Cloudflare AI Security for Apps all detect prompt attacks. Llama Guard 4 and the OpenAI Moderation API classify harmful content instead; Meta points to Llama Prompt Guard 2 for prompt attacks.
Which LLM guardrails are open source?
NeMo Guardrails (Apache 2.0) and Guardrails AI (Apache-2.0) are open-source frameworks. Granite Guardian (Apache 2.0) and Llama Guard 4 (Llama 4 Community License) are open-weight models you run yourself.
Are there free LLM guardrails?
Yes. The OpenAI moderation endpoint is free, Google Model Armor is free for up to 2 million tokens a month, Lakera’s Community plan includes 10k requests a month, and Azure AI Content Safety has a free tier of 5,000 text records a month.
Published price per 1,000 text units or text records (up to 1,000 characters each), in US dollars at a glance
Bedrock Guardrails content filters (InvokeGuardrailChecks)0.07 $ per 1,000
Bedrock Guardrails prompt attack (InvokeGuardrailChecks)0.08 $ per 1,000
Bedrock Guardrails sensitive information filters0.1 $ per 1,000
Bedrock Guardrails content filters0.15 $ per 1,000
Azure AI Content Safety Standard text0.38 $ per 1,000
Published price per 1,000 text units or text records (up to 1,000 characters each), in US dollars, as published by each maker. Picks without a published figure are left off.