How to Edit PDF Metadata: Change Title, Author, and Properties
Every PDF file carries hidden information called metadata — data about the document rather than the document's content. This metadata includes the title, author, subject, keywords, creation date, and software used to create the file. Properly maintained metadata improves document discoverability in search engines, helps with document management, and ensures professional presentation.
What Is PDF Metadata?
PDF metadata is structured information embedded in the PDF file according to the Extensible Metadata Platform (XMP) standard. It's stored separately from the document content and can be read by PDF viewers, search engines, and document management systems.
Standard PDF Metadata Fields
| Field | Description | Example |
|---|---|---|
| Title | Document title displayed in the viewer title bar | "Annual Report 2025" |
| Author | Creator of the document | "Jane Smith" |
| Subject | Brief description of the content | "Q4 Financial Summary" |
| Keywords | Comma-separated terms for search | "finance, quarterly, 2025, revenue" |
| Creator | Application that created the original file | "Microsoft Word" |
| Producer | Application that converted to PDF | "Adobe PDF Library" |
| CreationDate | When the document was created | "2025-01-15T10:30:00Z" |
| ModDate | When the document was last modified | "2025-03-20T14:00:00Z" |
Why Edit PDF Metadata?
- Improve SEO — PDF files can appear in search results if they have proper titles and descriptions
- Brand consistency — Ensure the author name and copyright information are correct
- Document management — Use keywords and subjects for easy categorization in document systems
- Professional presentation — Remove personal information before sharing externally
- Compliance — Add required metadata fields for regulatory or organizational standards
- Remove tracking — Strip creator and producer information for anonymity
How to Edit PDF Metadata Online
The PDF Metadata Editor tool on Help2Code allows you to view and edit PDF metadata entirely in your browser. Your file never leaves your device.
Step-by-Step Instructions
- Open the PDF Metadata Editor in your browser
- Upload your PDF — drag and drop or click to browse
- View current metadata — the tool displays all existing fields
- Edit the fields — update title, author, subject, keywords, and other properties
- Download the updated PDF — the file is processed locally and downloaded with the new metadata
Code Examples
JavaScript: Edit PDF Metadata with pdf-lib
const { PDFDocument } = require('pdf-lib');
async function editMetadata(sourceBytes, metadata) {
const doc = await PDFDocument.load(sourceBytes);
doc.setTitle(metadata.title);
doc.setAuthor(metadata.author);
doc.setSubject(metadata.subject);
doc.setKeywords(metadata.keywords);
doc.setProducer('Help2Code Metadata Editor');
doc.setCreator('Help2Code');
return await doc.save();
}
// Usage
const metadata = {
title: 'Annual Report 2025',
author: 'Jane Smith',
subject: 'Q4 Financial Summary',
keywords: 'finance, quarterly, 2025'
};
editPdfMetadata(pdfBuffer, metadata).then(result => {
// result is a Uint8Array with updated metadata
});
Python: Edit PDF Metadata with PyMuPDF
import fitz # PyMuPDF
def edit_pdf_metadata(input_pdf: str, output_pdf: str, metadata: dict):
doc = fitz.open(input_pdf)
doc.metadata = metadata
doc.save(output_pdf)
doc.close()
metadata = {
'title': 'Annual Report 2025',
'author': 'Jane Smith',
'subject': 'Q4 Financial Summary',
'keywords': 'finance, quarterly, 2025',
}
edit_pdf_metadata('input.pdf', 'output.pdf', metadata)
PHP: Edit PDF Metadata with FPDI + TCPDF
use setasign\Fpdi\Tcpdf\Fpdi;
function editPdfMetadata(string $inputFile, string $outputFile, array $metadata): void {
$pdf = new Fpdi();
$pageCount = $pdf->setSourceFile($inputFile);
// Import all pages
for ($i = 1; $i <= $pageCount; $i++) {
$templateId = $pdf->importPage($i);
$size = $pdf->getTemplateSize($templateId);
$pdf->addPage($size['orientation'] === 'L' ? 'L' : 'P', [$size['width'], $size['height']]);
$pdf->useTemplate($templateId);
}
// Set metadata
$pdf->SetTitle($metadata['title'] ?? '');
$pdf->SetAuthor($metadata['author'] ?? '');
$pdf->SetSubject($metadata['subject'] ?? '');
$pdf->SetKeywords($metadata['keywords'] ?? '');
$pdf->Output($outputFile, 'F');
}
Command Line: Using exiftool
exiftool is the most powerful command-line tool for reading and writing PDF metadata:
# Read all metadata from a PDF
exiftool document.pdf
# Write title and author
exiftool -Title="Annual Report 2025" -Author="Jane Smith" document.pdf
# Write keywords
exiftool -Keywords="finance; quarterly; 2025" document.pdf
# Remove specific metadata fields
exiftool -Creator= -Producer= document.pdf
# Remove all editable metadata
exiftool -all= document.pdf
Viewing Metadata Without Editing
# Linux: use pdfinfo
pdfinfo document.pdf
# macOS: use mdls
mdls document.pdf
# Windows PowerShell
Get-Item document.pdf | Select-Object *
Using Apache PDFBox (Java)
For enterprise environments with Java installed, Apache PDFBox provides comprehensive metadata editing:
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDDocumentInformation;
public class PdfMetadataEditor {
public static void main(String[] args) throws Exception {
PDDocument doc = PDDocument.load(new File("input.pdf"));
PDDocumentInformation info = doc.getDocumentInformation();
info.setTitle("Annual Report 2025");
info.setAuthor("Jane Smith");
info.setSubject("Q4 Financial Summary");
info.setKeywords("finance, quarterly, 2025");
doc.save("output.pdf");
doc.close();
}
}
Metadata and SEO
PDF files can appear in Google search results just like web pages. Google reads the following metadata fields:
- Title — Used as the search result title (overrides the filename)
- Description — If no meta description exists, Google may use the first text content
- Keywords — Less important for ranking but used by some document management systems
Best practices for PDF SEO:
- Set a descriptive, keyword-rich title (under 70 characters)
- Include a brief subject/description (under 160 characters)
- Use relevant keywords separated by commas
- Remove default "Microsoft Word" or "Adobe InDesign" creator fields
Privacy Considerations
PDF metadata can expose sensitive information:
| What It Reveals | Risk |
|---|---|
| Author name | Personal identity |
| Creator software | Version info that can be exploited |
| Creation date | Timeline of document creation |
| Modification history | Number of edits and when |
| Document path | Local file structure on the author's computer |
Before sharing a PDF externally, consider stripping personal metadata using the PDF Metadata Editor tool or running:
exiftool -all= clean-document.pdf
Troubleshooting
Problem: Title change doesn't appear in the file manager Solution: Some file managers cache metadata. Try refreshing the view or reopening the file.
Problem: Metadata reverts after re-saving Solution: Some PDF editors re-apply their own metadata on save. Edit metadata as the last step.
Problem: Fields appear blank after editing Solution: Verify the PDF isn't encrypted. Encrypted PDFs restrict metadata modification.
Problem: exiftool shows additional XMP metadata not visible in PDF viewer
Solution: PDFs can store metadata in multiple locations (Document Info Dictionary and XMP). Use exiftool -XMP:All= document.pdf to clear both.
Conclusion
PDF metadata is a small but important aspect of document management. Whether you're improving SEO, ensuring brand consistency, or protecting privacy, tools like the PDF Metadata Editor make it easy to update document properties in your browser without uploading files anywhere. For automated workflows, the programmatic examples above integrate metadata editing into your existing document processing pipelines.