---
title: "Secure PDFs & Office documents with C# REST API"
canonical_url: "https://www.nutrient.io/guides/document-converter/document-converter-services/document-security/csharp/"
md_url: "https://www.nutrient.io/guides/document-converter/document-converter-services/document-security/csharp.md"
last_updated: "2026-06-08T09:14:14.317Z"
description: "Learn to secure and password-protect PDFs and MS Office files in your app using REST API. Start your free trial today!"
---

# Secure and protect PDFs and Office documents in C#

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 — simply start your free trial or sign up for an account to integrate our REST API into your application.

## Code Samples: Secure Documents Using C#.NET

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 C#](https://github.com/Muhimbi/PDF-Converter-Services-Online/tree/master/clients/v1/csharp/samples/secure_document%20\(MS%20Office\))

2. [Secure PDF Documents Using C#](https://github.com/Muhimbi/PDF-Converter-Services-Online/tree/master/clients/v1/csharp/samples/secure_pdf)

---

## Related pages

- [Sample code in C# for pattern redaction and highlighting](/guides/document-converter/document-converter-services/document-security/code-samples.md)
- [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 your PDFs and Office files easily with .NET](/guides/document-converter/document-converter-services/document-security/dotnet-core.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)
- [Password protection for PDF documents in PHP](/guides/document-converter/document-converter-services/document-security/php.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)

