📝 Free PDF to Document Converter

Convert PDF documents to editable formats (DOCX, TXT, HTML, ODT)

📁

Drop PDF file here or click to browse

Maximum file size: 50MB

Supported format: PDF

Features

📄

Multiple Formats

Convert to DOCX, TXT, HTML, or ODT formats

✏️

Editable Output

Get fully editable documents from your PDFs

Fast Processing

Quick conversion with server-side processing

About PDF to Document Conversion

PDF to Document conversion transforms static PDF files into editable document formats. Whether you need to extract text for editing, convert to Word for collaboration, or create web-ready HTML, our tool handles all scenarios efficiently.

Unlike image-based conversions, document conversion preserves the textual content and structure of your PDF, making it perfect for editing, repurposing content, or integrating into your workflow.

Understanding Document Formats

📄 DOCX (Microsoft Word)

Best for: Editing documents, collaboration, professional documents
Advantages: Preserves formatting, widely compatible, editable in Word/Google Docs
Use Case: When you need to edit content, share with colleagues, or create new documents from PDFs

📝 TXT (Plain Text)

Best for: Text extraction, scripts, data processing
Advantages: Universal compatibility, smallest file size, no formatting overhead
Use Case: Extracting text for analysis, copying content, processing with scripts

🌐 HTML (Web Page)

Best for: Web publishing, online content, email newsletters
Advantages: Web-ready, maintains basic structure, viewable in any browser
Use Case: Publishing PDF content online, creating web articles, embedding in websites

📋 ODT (OpenDocument)

Best for: LibreOffice/OpenOffice users, open standards
Advantages: Open format, free software compatible, no vendor lock-in
Use Case: Organizations using open-source software, long-term archival

How to Convert PDF to Documents

  1. Upload Your PDF: Click the upload area or drag and drop your PDF file. Maximum file size is 50MB.
  2. Choose Output Format: Select DOCX for Word editing, TXT for plain text, HTML for web content, or ODT for LibreOffice.
  3. Convert: Click the convert button and wait for processing to complete.
  4. Download: Once complete, download your converted document.

Frequently Asked Questions

Will the converted document look exactly like the PDF?

Document conversion focuses on extracting and preserving text content. Simple PDFs convert with good fidelity, but complex layouts with multiple columns or embedded images may require manual adjustment after conversion.

Can I convert scanned PDFs (images)?

This tool works best with text-based PDFs. Scanned PDFs (image-based) may produce limited or no text output. For scanned documents, consider using OCR (Optical Character Recognition) tools first.

Is my data secure?

Yes, your data is secure. All files are processed on our secure servers and automatically deleted after conversion. We do not store, share, or access your documents.

Which format should I choose?

DOCX: If you need to edit the document in Word or Google Docs
TXT: If you just need the text content without formatting
HTML: If you want to publish the content on a website
ODT: If you use LibreOffice or prefer open formats

Privacy & Security

Secure Processing: All PDF conversions are processed on our secure servers using industry-standard encryption. Your files are transmitted over HTTPS.

Automatic Deletion: All uploaded PDFs and converted documents are automatically deleted from our servers immediately after the conversion process completes.

No Data Collection: We do not collect, store, or analyze the content of your PDFs. Our system only processes the files to perform the requested conversion.

API Documentation

Use our API to integrate PDF to Document conversion into your applications

Rate Limits & Pricing

Free tier: Manual conversions through the web interface are free.
API usage: Requires an API key and is billed at $0.01 per page converted.
Billing: Pay-as-you-go monthly billing. No prepaid credits needed.
Rate limit: 60 requests per hour per API key.

API Endpoints

The PDF to Document API uses an async job-based workflow with 3 endpoints:

POST /api/pdf/convert-to-document

Start a conversion job. Returns a jobId immediately.

GET /api/pdf/document-job/{jobId}

Check job status. Poll until status is "completed" or "failed".

GET /api/pdf/document-download/{jobId}

Download the converted document file.

GET /api/pdf/document-status

Check service status and available conversion formats.

Authentication

All API requests require an API key. Get yours from your account dashboard.

Required Header
X-API-Key: your_api_key_here

Request Parameters (POST /convert-to-document)

Parameter
Type
Required
Description
pdf
File
Required
The PDF file to convert (multipart/form-data). Max 50MB.
format
String
Optional
Output format: docx, txt, html, odt (default: docx)

Example: cURL

Complete workflow using cURL commands:

Bash / cURL
# Step 1: Start conversion job
JOB_RESPONSE=$(curl -X POST "https://www.bastiantechnologies.com/api/pdf/convert-to-document" \
  -H "X-API-Key: your_api_key_here" \
  -F "pdf=@document.pdf" \
  -F "format=docx")

JOB_ID=$(echo $JOB_RESPONSE | jq -r '.jobId')
echo "Job started: $JOB_ID"

# Step 2: Poll for completion
while true; do
  STATUS=$(curl -s "https://www.bastiantechnologies.com/api/pdf/document-job/$JOB_ID" \
    -H "X-API-Key: your_api_key_here")
  
  JOB_STATUS=$(echo $STATUS | jq -r '.status')
  echo "Status: $JOB_STATUS"
  
  if [ "$JOB_STATUS" = "completed" ]; then
    DOWNLOAD_URL=$(echo $STATUS | jq -r '.downloadUrl')
    break
  elif [ "$JOB_STATUS" = "failed" ]; then
    echo "Error: $(echo $STATUS | jq -r '.error')"
    exit 1
  fi
  
  sleep 2
done

# Step 3: Download result
curl -o "converted.docx" "$DOWNLOAD_URL" \
  -H "X-API-Key: your_api_key_here"

echo "Downloaded: converted.docx"

Example: JavaScript / Node.js

JavaScript
const API_KEY = 'your_api_key_here';
const API_BASE = 'https://www.bastiantechnologies.com/api/pdf';

async function convertPdfToDocument(pdfFile, format = 'docx') {
  // Step 1: Start conversion job
  const formData = new FormData();
  formData.append('pdf', pdfFile);
  formData.append('format', format);

  const startResponse = await fetch(`${API_BASE}/convert-to-document`, {
    method: 'POST',
    headers: { 'X-API-Key': API_KEY },
    body: formData
  });
  
  if (!startResponse.ok) {
    throw new Error(`Failed to start job: ${startResponse.status}`);
  }
  
  const { jobId } = await startResponse.json();
  console.log('Job started:', jobId);

  // Step 2: Poll for completion
  let result;
  while (true) {
    await new Promise(r => setTimeout(r, 1500)); // Wait 1.5s
    
    const statusRes = await fetch(`${API_BASE}/document-job/${jobId}`, {
      headers: { 'X-API-Key': API_KEY }
    });
    result = await statusRes.json();
    
    console.log('Progress:', result.progress + '%');
    
    if (result.status === 'completed') break;
    if (result.status === 'failed') {
      throw new Error(result.error);
    }
  }

  // Step 3: Download result
  const fileRes = await fetch(result.downloadUrl, {
    headers: { 'X-API-Key': API_KEY }
  });
  
  return await fileRes.blob();
}

// Usage
const pdfFile = document.querySelector('input[type="file"]').files[0];
const docxBlob = await convertPdfToDocument(pdfFile, 'docx');

// Save the file
const url = URL.createObjectURL(docxBlob);
const a = document.createElement('a');
a.href = url;
a.download = 'converted.docx';
a.click();

Example: Python

Python
import requests
import time

API_KEY = "your_api_key_here"
API_BASE = "https://www.bastiantechnologies.com/api/pdf"
headers = {"X-API-Key": API_KEY}

def convert_pdf_to_document(pdf_path, output_format="docx"):
    # Step 1: Start conversion job
    with open(pdf_path, "rb") as f:
        files = {"pdf": f}
        data = {"format": output_format}
        response = requests.post(
            f"{API_BASE}/convert-to-document",
            headers=headers,
            files=files,
            data=data
        )
    
    response.raise_for_status()
    job_id = response.json()["jobId"]
    print(f"Job started: {job_id}")
    
    # Step 2: Poll for completion
    while True:
        time.sleep(1.5)
        status_response = requests.get(
            f"{API_BASE}/document-job/{job_id}",
            headers=headers
        )
        result = status_response.json()
        
        print(f"Progress: {result.get('progress', 0)}%")
        
        if result["status"] == "completed":
            break
        elif result["status"] == "failed":
            raise Exception(result.get("error", "Conversion failed"))
    
    # Step 3: Download result
    download_response = requests.get(
        result["downloadUrl"],
        headers=headers
    )
    
    output_file = f"converted.{output_format}"
    with open(output_file, "wb") as f:
        f.write(download_response.content)
    
    print(f"Downloaded: {output_file}")
    return output_file

# Usage
convert_pdf_to_document("document.pdf", "docx")  # Convert to Word
convert_pdf_to_document("document.pdf", "txt")   # Convert to text
convert_pdf_to_document("document.pdf", "html")  # Convert to HTML
convert_pdf_to_document("document.pdf", "odt")   # Convert to ODT

Example: Node.js with Axios & fs

Node.js
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');

const API_KEY = 'your_api_key_here';
const API_BASE = 'https://www.bastiantechnologies.com/api/pdf';

async function convertPdf(pdfPath, format = 'docx') {
  // Step 1: Start conversion
  const formData = new FormData();
  formData.append('pdf', fs.createReadStream(pdfPath));
  formData.append('format', format);

  const { data: jobData } = await axios.post(
    `${API_BASE}/convert-to-document`,
    formData,
    { headers: { 'X-API-Key': API_KEY, ...formData.getHeaders() } }
  );
  
  console.log('Job ID:', jobData.jobId);

  // Step 2: Poll for completion
  let result;
  while (true) {
    await new Promise(r => setTimeout(r, 1500));
    
    const { data } = await axios.get(
      `${API_BASE}/document-job/${jobData.jobId}`,
      { headers: { 'X-API-Key': API_KEY } }
    );
    
    result = data;
    console.log('Status:', result.status, 'Progress:', result.progress);
    
    if (result.status === 'completed') break;
    if (result.status === 'failed') throw new Error(result.error);
  }

  // Step 3: Download
  const { data: fileData } = await axios.get(result.downloadUrl, {
    headers: { 'X-API-Key': API_KEY },
    responseType: 'arraybuffer'
  });

  const outputPath = `converted.${format}`;
  fs.writeFileSync(outputPath, Buffer.from(fileData));
  console.log('Saved to:', outputPath);
  
  return outputPath;
}

convertPdf('./document.pdf', 'docx');

🔗 n8n Workflow Integration

Complete 3-node workflow for PDF to Document conversion with status polling and download:

Node 1: Start Conversion (HTTP Request)

n8n HTTP Request - Start Job
Method: POST
URL: https://www.bastiantechnologies.com/api/pdf/convert-to-document

Authentication: Generic Credential Type → Header Auth
  Name: X-API-Key
  Value: your_api_key_here

Body Content Type: Form-Data/Multipart

Body Parameters:
  pdf (File):     {{ $binary.data }}
  format (Text):  docx  // or: txt, html, odt

Options:
  Response Format: JSON

Node 2: Poll Status (Loop Until Complete)

n8n Loop + Wait + HTTP Request
// Option A: Use n8n's "Loop Over Items" node
Loop Condition: {{ $json.status !== "completed" && $json.status !== "failed" }}
Max Iterations: 60

// Inside the loop:
// 1. Add Wait node: 2 seconds delay
// 2. Add HTTP Request node:

Method: GET
URL: https://www.bastiantechnologies.com/api/pdf/document-job/{{ $('Start Conversion').item.json.jobId }}

Authentication: Same as Node 1

Options:
  Response Format: JSON

// Option B: Use "HTTP Request" node with "Retry on Fail"
// and check status in an IF node after

Node 3: Download Result (HTTP Request)

n8n HTTP Request - Download File
Method: GET
URL: {{ $('Poll Status').item.json.downloadUrl }}

// OR use direct URL:
URL: https://www.bastiantechnologies.com/api/pdf/document-download/{{ $('Start Conversion').item.json.jobId }}

Authentication: Same as Node 1

Options:
  Response Format: File
  Put Output in Field: data

// The binary data will be available at {{ $binary.data }}
// You can then use "Write Binary File" or "Send Email" nodes

Complete n8n Workflow JSON (Import Ready)

n8n Workflow JSON
{
  "name": "PDF to Document Converter",
  "nodes": [
    {
      "name": "Start Conversion",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "POST",
        "url": "https://www.bastiantechnologies.com/api/pdf/convert-to-document",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            { "name": "format", "value": "docx" }
          ]
        },
        "sendBinaryData": true,
        "binaryPropertyName": "data",
        "options": {}
      }
    },
    {
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "parameters": { "amount": 2, "unit": "seconds" }
    },
    {
      "name": "Check Status",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "GET",
        "url": "=https://www.bastiantechnologies.com/api/pdf/document-job/{{ $('Start Conversion').item.json.jobId }}"
      }
    },
    {
      "name": "Download File",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "GET",
        "url": "={{ $json.downloadUrl }}",
        "options": { "response": { "response": { "responseFormat": "file" } } }
      }
    }
  ]
}

💡 Tips:
• Add Header Authentication credential with X-API-Key to all HTTP Request nodes
• For the loop, use n8n's "Loop Over Items" or implement with IF + Merge nodes
• The downloaded file will be in binary format, ready for "Write Binary File" or email attachments

API Workflow Flow

The PDF to Document API uses an asynchronous job-based workflow:

1. POST
/convert-to-document
Returns jobId
2. GET (Poll)
/document-job/{jobId}
Until completed
3. GET
/document-download/{jobId}
Download file

💡 Tip: Poll every 1-2 seconds. Jobs typically complete in seconds, but may take longer for large PDFs.

🔒 Note: Web users (no API key) get FREE conversions. API key users are billed $0.01 per page.

API Response Schemas

POST /convert-to-document Response:

Success (200)
{
  "success": true,
  "jobId": "f28d1c02-7cfa-4d31-a8fa-951636f3528f",
  "message": "Conversion job started",
  "status": "pending",
  "format": "docx"
}

GET /document-job/{jobId} Response (Processing):

Processing
{
  "jobId": "f28d1c02-7cfa-4d31-a8fa-951636f3528f",
  "status": "processing",
  "progress": 50,
  "format": "docx"
}

GET /document-job/{jobId} Response (Completed):

Completed
{
  "jobId": "f28d1c02-7cfa-4d31-a8fa-951636f3528f",
  "status": "completed",
  "progress": 100,
  "format": "docx",
  "result": {
    "format": "docx",
    "fileSize": 245760,
    "fileName": "document.docx",
    "pageCount": 5,
    "processingTime": "2.3s"
  },
  "downloadUrl": "https://www.bastiantechnologies.com/api/pdf/document-download/f28d1c02-..."
}

Error Responses:

Error (400/401/403/404/500)
{
  "error": "Invalid API key",
  "message": "The provided API key is invalid or has been revoked"
}

// Common error codes:
// 400 - Bad Request (invalid parameters)
// 401 - Unauthorized (missing API key)
// 403 - Forbidden (invalid API key)
// 404 - Job not found
// 429 - Rate limit exceeded
// 500 - Server error

Supported Output Formats

Format
MIME Type
Use Case
Notes
docx
application/vnd.openxmlformats...
Edit in Word
Microsoft Word format. Best for editing.
txt
text/plain
Extract text
Plain text. Fast, preserves layout.
html
text/html
Web publishing
HTML with basic styling.
odt
application/vnd.oasis...
Open format
OpenDocument. Works with LibreOffice.