Blog
How to Write a Privacy Policy for Your SaaS App in 2026
Published March 16, 2026 · 18 min read
Every SaaS application needs a privacy policy. It is not optional. GDPR requires one if you have any EU users. The CCPA requires one if you have California users. And practically every app store, payment processor, and enterprise buyer will ask for one before doing business with you.
Yet most SaaS founders treat privacy policies as an afterthought — copying a template from another website, running it through ChatGPT, or ignoring it until a customer asks. The result is a document that either says nothing useful or makes promises the application does not keep. Both outcomes create legal liability.
This guide walks you through writing a privacy policy for a SaaS application from scratch. It covers what the law actually requires, what your users expect, and how to create a document that accurately reflects your application's data practices. Whether you are pre-launch or updating an existing policy, you will find practical, actionable guidance here. If you are also working on GDPR compliance more broadly, this post pairs well with our developer-focused GDPR guide.
Why your SaaS privacy policy matters more than you think
A privacy policy is not just a legal document. It is a trust signal. Enterprise buyers review it during procurement. Privacy- conscious users read it before signing up. Regulators use it as the first evidence in enforcement actions. And increasingly, AI governance frameworks reference privacy policies as baseline compliance documentation.
In 2026, the stakes are higher than ever. GDPR enforcement has produced over 4.5 billion EUR in fines across more than 2,000 cases. The CCPA (now CPRA) has an active enforcement division. New state privacy laws in Texas, Oregon, Montana, and others took effect in 2024 and 2025. The EU AI Act adds transparency requirements for AI-powered applications. Your privacy policy needs to address all of these.
A well-written SaaS privacy policy also reduces support burden. When users can find clear answers about data handling, they file fewer tickets. When enterprise buyers can quickly verify your data practices, sales cycles shorten. It is a business advantage disguised as a legal requirement.
Legal requirements: what the law says you must include
Different jurisdictions have different requirements, but most privacy laws converge on the same core disclosures. Here is what you must include to comply with the major frameworks:
GDPR requirements (EU/EEA users)
The General Data Protection Regulation requires your privacy policy to disclose:
- Identity and contact details of the data controller (your company) and your Data Protection Officer if you have one.
- Categories of personal data you collect, with specificity. "We collect personal information" is not sufficient. List the actual data: email addresses, IP addresses, usage analytics, payment information, and so on.
- Legal basis for processing each category of data. Under GDPR, you must identify whether you process data based on consent, contractual necessity, legitimate interest, or legal obligation.
- Data retention periods for each category, or the criteria used to determine retention.
- Third parties with whom you share data, including sub-processors, analytics providers, and payment processors.
- International data transfers and the safeguards in place (Standard Contractual Clauses, adequacy decisions, etc.).
- User rights including access, rectification, erasure, portability, restriction, and the right to object.
- Right to lodge a complaint with a supervisory authority.
CCPA/CPRA requirements (California users)
The California Consumer Privacy Act, as amended by the California Privacy Rights Act, requires:
- Categories of personal information collected in the preceding 12 months.
- Sources of that information (directly from users, from third parties, automatically collected).
- Business purposes for collection and use.
- Categories of third parties with whom you share information.
- Whether you sell or share personal information, and if so, a "Do Not Sell or Share My Personal Information" link.
- Consumer rights including the right to know, delete, correct, and opt out.
- Financial incentives tied to data collection, if any.
Other US state privacy laws
As of 2026, over 15 US states have comprehensive privacy laws in effect. While each has nuances, they generally require the same core disclosures as CCPA plus specific rights like appeal processes and opt-out preference signals. A well-structured GDPR and CCPA compliant privacy policy will cover most state requirements, but you should verify against each state where you have significant user populations. For state-specific AI regulations, see our Colorado AI Act guide.
GDPR Article 13 checklist: what your privacy policy must contain
Article 13 of the GDPR specifies exactly what information must be provided when personal data is collected directly from the data subject. Use this checklist to audit your existing privacy policy or ensure your new one is complete:
Article 13 Required Disclosures
Codepliant automatically detects which of these disclosures apply to your application based on the services and data flows it finds in your codebase. Run npx codepliant go to generate a privacy policy that addresses each applicable item.
SaaS-specific considerations most templates miss
Generic privacy policy templates are written for generic websites. SaaS applications have unique data practices that require specific disclosures. Here is what most templates miss:
User-generated content and customer data
SaaS applications store customer data — the content your users create and manage within your application. This is fundamentally different from data you collect about users. Your privacy policy must distinguish between data you collect for your own purposes (analytics, billing, support) and data your customers store using your service. For the latter, you are typically a data processor under GDPR, not a data controller, and different obligations apply.
Third-party integrations and sub-processors
Most SaaS applications integrate with dozens of third-party services: payment processors like Stripe, analytics tools like Mixpanel or PostHog, error tracking like Sentry, email delivery via SendGrid or Resend, cloud hosting on AWS or Vercel, and AI APIs from OpenAI or Anthropic. Each of these is a sub-processor that handles your users' data.
Your privacy policy must disclose these third parties. GDPR requires you to name them or at minimum categorize them. Best practice is to maintain a sub-processor list that you reference from your privacy policy. This list should include the sub-processor name, purpose, data processed, and location.
AI features and automated decision-making
If your SaaS uses AI — and most do in 2026 — your privacy policy must address it. GDPR Article 22 gives users the right not to be subject to decisions based solely on automated processing. The EU AI Act adds transparency requirements for AI systems. Your privacy policy should disclose what AI features your application includes, what data they process, whether they make or influence decisions, and how users can opt out or request human review. See our AI Disclosure Generator for automated AI transparency documentation.
Multi-tenant data isolation
SaaS applications are multi-tenant by nature. Your privacy policy should reassure users that their data is logically isolated from other customers. While you do not need to describe your technical architecture, stating that customer data is isolated and not accessible to other customers builds trust and addresses a common concern in enterprise procurement.
Step-by-step: writing your SaaS privacy policy
Here is a practical process for creating a privacy policy that is both legally compliant and genuinely useful.
Step 1: Audit your actual data practices
Before writing anything, you need to know what your application actually does with data. This is where most privacy policies go wrong — they are written based on assumptions rather than facts. Run Codepliant against your codebase to generate an accurate inventory of data collection, third-party integrations, and AI usage:
Codepliant scans your package.json, source code imports, environment variables, and configuration files to detect services like Stripe, Google Analytics, Sentry, OpenAI, and dozens more. The output tells you exactly what data your application collects and which third parties it shares data with.
Step 2: Map data flows
For each data category, document where data comes from (user input, automatic collection, third parties), where it is stored (your database, third-party services, CDNs), who can access it (your team, sub-processors, AI providers), and how long it is retained.
This mapping exercise reveals disclosures you might otherwise miss. For example, if you use Sentry for error tracking, stack traces may contain user data. If you use an AI API, user inputs may be sent to the AI provider's servers. These data flows must be disclosed.
Step 3: Structure the document
A well-structured SaaS privacy policy should include these sections:
- Introduction — Who you are, what the policy covers, effective date.
- Information we collect — Broken down by category: account data, usage data, payment data, customer content, cookies and tracking.
- How we use your information — Specific purposes tied to specific data categories.
- Legal basis for processing — Required for GDPR compliance.
- How we share your information — Sub-processors, legal requirements, business transfers.
- International data transfers — Safeguards for cross-border data flows.
- Data retention — How long you keep each category.
- Your rights — GDPR rights, CCPA rights, how to exercise them.
- AI and automated processing — AI features, data sent to AI providers, opt-out options.
- Security — Overview of security measures.
- Children's privacy — Age restrictions and COPPA compliance.
- Changes to this policy — How you notify users of updates.
- Contact information — How to reach you with privacy questions.
Step 4: Write in plain language
GDPR explicitly requires that privacy policies be written in "clear and plain language." This means avoiding legal jargon, using short sentences, and structuring information so users can find what they need quickly. Write at an eighth-grade reading level. Use headings and bullet points. Define technical terms when you must use them.
Bad: "We may process certain categories of personal data insofar as such processing is necessary for the legitimate interests pursued by the controller or by a third party."
Good: "We use your email address to send you account notifications and product updates. You can opt out of product updates at any time from your account settings."
Step 5: Keep it accurate and up to date
A privacy policy is only as good as its accuracy. Every time you add a new integration, enable a new analytics tool, or ship an AI feature, your privacy policy may need updating. This is why Codepliant is designed to run in CI/CD pipelines — it regenerates compliance documentation on every deployment, so your privacy policy stays in sync with your actual data practices.
Detecting services and generating a privacy policy with Codepliant
Codepliant scans your project to detect every third-party service that touches user data. Here is what the scan looks like for a typical SaaS application:
$ npx codepliant go
Scanning project...
✓ package.json dependencies
✓ Source code imports
✓ Environment variables
✓ Configuration files
Detected services:
Payment Stripe (stripe, @stripe/stripe-js)
Analytics PostHog (posthog-js)
Analytics Google Analytics (NEXT_PUBLIC_GA_ID)
Auth NextAuth (next-auth)
Error Sentry (@sentry/nextjs, SENTRY_DSN)
Email Resend (resend, RESEND_API_KEY)
AI OpenAI (openai, OPENAI_API_KEY)
Database Prisma (@prisma/client)
Generating documents...
✓ ./compliance/privacy-policy.md
✓ ./compliance/terms-of-service.md
✓ ./compliance/cookie-policy.md
✓ ./compliance/ai-disclosure.md
Done. 4 documents generated.The generated privacy policy includes service-specific disclosures for every detected integration. For example, if Codepliant detects Stripe, the privacy policy will include a section about payment data processed by Stripe, the categories of data involved (payment card numbers, billing addresses, transaction history), and a reference to Stripe's own privacy policy.
You can also use the JSON output to inspect exactly which services were detected and what data categories apply:
$ npx codepliant scan --json | jq '.services[] | {name, category, dataCollected}'
{
"name": "Stripe",
"category": "payment",
"dataCollected": ["payment card numbers", "billing addresses", "transaction history"]
}
{
"name": "PostHog",
"category": "analytics",
"dataCollected": ["page views", "click events", "session recordings", "IP addresses"]
}
{
"name": "Sentry",
"category": "error-tracking",
"dataCollected": ["error stack traces", "browser metadata", "IP addresses"]
}
{
"name": "OpenAI",
"category": "ai",
"dataCollected": ["user prompts", "API request metadata"]
}This structured output makes it straightforward to build a data map for your privacy policy. Each detected service maps directly to a disclosure requirement under GDPR Article 13(1)(e) (recipients of personal data) and Article 13(1)(c) (purposes of processing).
For CI/CD integration, add Codepliant to your deployment pipeline so compliance documents are regenerated whenever your dependencies change:
name: Compliance Docs
on:
push:
branches: [main]
paths:
- 'package.json'
- 'requirements.txt'
- '.env.example'
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx codepliant go
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs: regenerate compliance documents"Common privacy policy mistakes SaaS companies make
Copying a competitor's privacy policy
Their data practices are different from yours. A copied policy will either under-disclose (creating legal risk) or over-disclose (undermining trust by claiming you collect data you do not).
Using vague language to cover everything
Phrases like 'we may collect various types of information' violate GDPR's specificity requirements. Regulators have fined companies for vague privacy policies.
Forgetting third-party services
If you use Stripe, Google Analytics, Sentry, or any external API, you are sharing user data with those services. This must be disclosed.
Not disclosing AI data processing
If user data is sent to OpenAI or Anthropic for processing, this is a data transfer to a third party. GDPR and the EU AI Act require transparency about AI processing.
Setting it and forgetting it
Your data practices change every time you ship a feature. A privacy policy written at launch is almost certainly inaccurate six months later.
No retention periods
GDPR requires specific retention periods or criteria. 'We retain your data for as long as necessary' is not compliant.
SaaS privacy policy template: what to include in each section
While every SaaS application is different, here is a template outline with guidance on what to include in each section. This is not a copy-paste template — it is a framework you should adapt to your actual data practices.
Information we collect
Break this into clear sub-categories. For a typical SaaS application, these include:
- Account information: Name, email address, company name, job title. Collected during signup and profile setup.
- Payment information: Credit card details, billing address. Typically processed by Stripe or a similar payment processor — clarify that you do not store raw card numbers.
- Usage data: Pages viewed, features used, session duration, click patterns. Collected via analytics tools.
- Device and technical data: IP address, browser type, operating system, device identifiers. Collected automatically.
- Customer content: Data your users create, upload, or store within your application. Clarify your role as data processor for this content.
- Communications: Support tickets, emails, chat messages. Retained for support quality and dispute resolution.
How we use your information
Tie each use to a specific purpose and, for GDPR, a legal basis:
- Providing the service: Account information and customer content are processed to deliver the service you signed up for. Legal basis: contractual necessity.
- Billing: Payment information is processed to charge for subscriptions. Legal basis: contractual necessity.
- Analytics and improvement: Usage data helps us understand how features are used and prioritize improvements. Legal basis: legitimate interest.
- Support: Communications are used to resolve your issues. Legal basis: contractual necessity.
- Security: Technical data is used for fraud prevention and security monitoring. Legal basis: legitimate interest.
Generate your privacy policy from your codebase
Writing a privacy policy manually is time-consuming and error- prone. You have to audit your codebase, identify every integration, map data flows, and then translate all of that into clear legal language. And you have to repeat this process every time your application changes.
Codepliant automates this entire process. It scans your source code, detects third-party services and data collection patterns, and generates a privacy policy that accurately reflects your application's data practices. Because it reads your actual code, the output is specific to your application — not a generic template.
To generate a privacy policy for your SaaS application:
Codepliant produces a markdown privacy policy alongside terms of service, cookie policy, and AI disclosure documentation. Run it in your CI/CD pipeline to keep your compliance documents synchronized with your code.
Keeping your privacy policy current
A privacy policy is a living document. Here are the events that should trigger a review and potential update:
- Adding a new third-party integration or sub-processor
- Shipping an AI feature or changing AI providers
- Expanding to new markets or jurisdictions
- Changing data retention practices
- Adding new data collection points (forms, tracking, etc.)
- Changes to applicable privacy laws
- Acquisitions, mergers, or other corporate changes
When you update your privacy policy, notify existing users. GDPR does not prescribe a specific notification method, but best practice is an in-app banner or email notification with a summary of changes and a link to the updated policy.
Generate your SaaS privacy policy
Scan your codebase to generate a privacy policy based on your actual data practices. Free, open source, no account required.
Run this command in your project directory to generate a privacy policy, terms of service, cookie policy, and AI disclosure.
Related resources
GDPR Compliance for Developers
Practical GDPR guide for engineering teams building SaaS products.
EU AI Act: What Developers Need to Know
Comprehensive guide to EU AI Act deadlines, risk classifications, and compliance steps.
Colorado AI Act Guide
State-level AI regulation and what it means for your SaaS application.
Generate Privacy Policy from Code in 30 Seconds
Step-by-step tutorial for scanning your codebase and generating an accurate privacy policy.
HIPAA for SaaS Developers
HIPAA compliance guide for SaaS developers handling health data.
SOC 2 for Startups
Developer survival guide to SOC 2 compliance with a 30-day readiness timeline.
Privacy Policy Generator
Generate a privacy policy from your codebase in seconds.
GDPR Compliance Hub
Everything you need to know about GDPR compliance for your application.
Data Privacy Compliance Hub
Overview of all compliance frameworks Codepliant supports.