---
title: "Password protection for PDF documents in PHP"
canonical_url: "https://www.nutrient.io/guides/document-converter/document-converter-services/document-security/php/"
md_url: "https://www.nutrient.io/guides/document-converter/document-converter-services/document-security/php.md"
last_updated: "2026-06-08T17:11:05.457Z"
description: "Easily secure PDFs and Office documents by adding passwords using our REST API. Start your free trial today for document confidentiality!"
---

# Password protection for PDF documents in PHP

Ensure document confidentiality by securing PDF and MS Office documents in your application using our REST API. Add passwords to your PDF files or restrict the copying and printing of documents in your workflow. No server setup is required — start your free trial or sign up for an account to integrate our REST API into your application.

## Code samples: Secure documents using PHP

Explore our code samples to learn how you can quickly secure PDF and Office documents in your application or workflow.

1. [Secure MS Office documents using PHP](https://github.com/Muhimbi/PDF-Converter-Services-Online/tree/master/clients/v1/php/samples/secure_document)

2. [Secure PDF documents using PHP](https://github.com/Muhimbi/PDF-Converter-Services-Online/tree/master/clients/v1/php/samples/secure_pdf)

[Contact us](https://www.nutrient.io/contact-sales) to explore more solutions!
---

## Related pages

- [Secure PDF API](/guides/document-converter/document-converter-services/document-security.md)
- [Secure PDF and MS Office documents with Java](/guides/document-converter/document-converter-services/document-security/java.md)
- [Secure and protect PDFs and Office documents in C#](/guides/document-converter/document-converter-services/document-security/csharp.md)
- [Secure your PDFs and Office files easily with .NET](/guides/document-converter/document-converter-services/document-security/dotnet-core.md)
- [Sample code in C# for pattern redaction and highlighting](/guides/document-converter/document-converter-services/document-security/code-samples.md)
- [Secure PDF and Office documents with JavaScript](/guides/document-converter/document-converter-services/document-security/javascript.md)
- [WSDL URL.](/guides/document-converter/document-converter-services/document-security/pattern-highlighting-using-python.md)
- [Pattern redaction and highlighting with C#](/guides/document-converter/document-converter-services/document-security/pattern-redaction-and-highlighting.md)
- [WSDL URL.](/guides/document-converter/document-converter-services/document-security/pattern-redaction-using-python.md)
- [Smart document redaction with C#](/guides/document-converter/document-converter-services/document-security/smart-redaction.md)

