What is the XFDF file format?
An .xfdf file (XML Forms Data Format) is an XML document that stores only the field values and annotations for a PDF form - it does NOT contain the visual form layout or document pages. Think of it as a thin data layer that travels separately from the blank form: to reconstruct a filled-out document you import the .xfdf back into its matching PDF in Acrobat or a compatible viewer.
The root element is <xfdf xmlns="http://ns.adobe.com/xfdf/">, which contains a <fields> block with nested <field name="..."><value>...</value></field> entries for each form control. An optional <f href="..."/> element points to the associated PDF file. The <annots> block, when present, carries PDF annotations such as highlights, sticky notes, and stamps.
Adobe introduced the format around 2000 alongside Acrobat 5 as the XML-friendly alternative to the older binary FDF format. Unlike .fdf, XFDF integrates naturally with web servers, databases, and any XML toolchain - a server can generate or parse .xfdf with a standard XML library without needing a dedicated PDF library. XFDF 3.0 was codified as ISO 19444-1:2019, binding it to the PDF 2.0 specification.
Files are plain UTF-8 text, typically 1-50 KB, and open in any text editor. Acrobat, Foxit, and most modern PDF editors support import and export of .xfdf.
Security & safety
RISK: LOWXFDF is plain XML with no executable code. It cannot run scripts or exploit vulnerabilities on its own. In older Acrobat versions, XSS-like XML injection via malformed XFDF was theoretical but required user import into a vulnerable Acrobat. Modern Acrobat versions sanitize input. Treat XFDF from untrusted sources with normal caution but it is not a significant threat vector.
Format details
in a nutshellPrograms that open XFDF files
Technical details
deep spec| Root XML element | `<xfdf xmlns="http://ns.adobe.com/xfdf/">` containing `<fields>` and optional `<annots>` |
| MIME type | `application/vnd.adobe.xfdf` (primary); `application/xfdf` also accepted |
| File encoding | UTF-8 plain text XML; UTF-8 with BOM also valid |
| File signature | `<?xml` at byte offset 0 (standard XML declaration) |
| Specification | ISO 19444-1:2019 (XFDF 3.0), tied to PDF 2.0 / ISO 32000-2 |
| Form data structure | `<fields>` with nested `<field name>` / `<value>` children per form control |
| Annotation support | `<annots>` block carries highlights, sticky notes, stamps, and ink annotations |
| PDF reference link | `<f href="..."/>` element links the XFDF to its associated source PDF |
| Typical file size | 1 KB - 50 KB (field data only; no page content or images embedded) |
| Compression | No built-in compression; can be gzip-compressed at the HTTP transport level |
| Security model | No built-in encryption; security relies on the receiving PDF's own permission settings |
| Limitations vs FDF | No page spawning, no embedded file attachments - intentional subset of FDF functionality |
| XML toolchain | Generatable and parseable with any standard XML library; no PDF-specific tools required |
| Older alternative | FDF (`.fdf`) - broader feature set but uses non-XML binary-adjacent PDF object syntax |
| Released | 2000 (Acrobat 5 era); latest spec XFDF 3.0 - ISO 19444-1:2019, based on PDF 2.0 / ISO 32000-2 |
| Latest version | XFDF 3.0 (ISO 19444-1:2019) |
| Open standard | Yes · royalty-free |
| Specification | www.iso.org |
XFDF conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about XFDF files.