---
title: "Secure PDF and Office documents with JavaScript"
canonical_url: "https://www.nutrient.io/guides/document-converter/document-converter-services/document-security/javascript/"
md_url: "https://www.nutrient.io/guides/document-converter/document-converter-services/document-security/javascript.md"
last_updated: "2026-06-09T10:24:28.825Z"
description: "Protect your PDFs and MS Office files by adding passwords and restrictions using our simple REST API. Start your free trial today!"
---

# Secure PDF and Office documents with JavaScript

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 JavaScript

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 JavaScript](https://github.com/Muhimbi/PDF-Converter-Services-Online/tree/master/clients/v1/javascript/samples/secure_document)

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

---

## Related pages

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

