
Learn how to perform PDF to Word document conversion using Node.js API.
PDF (Portable Document Format) is widely used for secure and platform-independent document sharing, but it’s not ideal for editing. In contrast, Microsoft Word (DOC, DOCX) allows flexible formatting and content manipulation. Converting PDF to Word provides the best of both worlds—retaining the original layout while allowing easy edits.
In this guide, we’ll show you how to convert PDF to Word using the GroupDocs.Conversion Cloud SDK for Node.js, a developer-friendly and highly scalable REST API solution.
- PDF to DOCX Conversion API in Node.js
- Convert PDF to Word Using Node.js
- PDF to Word Using cURL (REST API)
PDF to DOCX Conversion API in Node.js
GroupDocs.Conversion Cloud SDK for Node.js allows seamless PDF to Word transformation using cloud-based RESTful services. You can convert PDF files to DOC or DOCX formats using just a few lines of code.
Key Features:
- Convert PDF to DOC or DOCX with high fidelity
- Upload and download documents through cloud storage
- Secure authentication using OAuth 2.0
- No need for third-party tools like Adobe or MS Word
- Supports conversion between 50+ file formats
Installation and Setup
- Install the SDK via npm:
npm install groupdocs-conversion-cloud --save
- Get your API credentials:
Sign up at the GroupDocs Cloud Dashboard and obtain your Client ID and Client Secret details.
Convert PDF to Word Using Node.js
Here’s how to implement PDF to DOCX conversion in a Node.js application:
- Initialize API Configuration:
const {
Configuration,
ConvertApi,
FileApi,
UploadFileRequest,
ConvertDocumentRequest,
ConvertSettings
} = require("groupdocs-conversion-cloud");
const config = new Configuration("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET");
const convertApi = new ConvertApi(config);
const fileApi = new FileApi(config);
- Upload PDF file to the Cloud Storage:
const fs = require("fs");
const uploadRequest = new UploadFileRequest("sample.pdf", fs.createReadStream("sample.pdf"));
await fileApi.uploadFile(uploadRequest);
- Setup Conversion Settings:
const settings = new ConvertSettings();
settings.filePath = "sample.pdf";
settings.format = "docx";
settings.outputPath = "converted/output.docx";
- Execute the Conversion:
const request = new ConvertDocumentRequest(settings);
const result = await convertApi.convertDocument(request);
console.log("PDF successfully converted to Word.");

Image:- A preview of PDF to DOCX conversion using Node.js API.
PDF to Word Using cURL (REST API)
If you prefer directly using the REST APIs, then cURL commands are the perfect solution.
Step 1 – Generate Access Token:
curl -v "https://api.groupdocs.cloud/connect/token" \
-X POST \
-d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json"
Step 2 – Convert PDF to DOCX:
curl -v "https://api.groupdocs.cloud/v2.0/conversion" \
-X POST \
-H "Authorization: Bearer <JWT_TOKEN>" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"FilePath": "<inputFile>",
"Format": "docx",
"OutputPath": "converted/<resultantDOCX>",
"LoadOptions": {
"Format": "pdf"
}
}'
Please replace inputFile
with the name of input PDF document, resultantDOCX
with the name of resultant Word document and JWT_TOKEN
with personalized JWT access token.
PDF to DOC Conversion - Save resultant file on local drive: If you prefer saving the resultant DOC file on local drive, please try executing following cURL command:
curl -v "https://api.groupdocs.cloud/v2.0/conversion" \
-X POST \
-H "accept: application/json" \
-H "authorization: Bearer {JWT_TOKEN}" \
-H "Content-Type: application/json" \
-d "{ \"StorageName\": \"internal\", \"FilePath\": \"{inputFile}\", \"Format\": \"doc\", \"LoadOptions\": { \"Format\": \"pdf\" }}" \
-o "localResultant.doc"
🌐 Try Free PDF to Word Converter Online
Want to preview the conversion capabilities? Use the Free PDF to DOCX Conversion web app powered by GroupDocs.Conversion Cloud.

Useful Resources
Conclusion
With GroupDocs.Conversion Cloud SDK for Node.js, converting PDF to Word is fast, secure, and easy to integrate into your applications. Whether you’re building cloud platforms, document automation tools, or simply enhancing accessibility, this API gives you the flexibility to convert PDF into editable DOCX or DOC formats efficiently.