Convert a PDF to XML

Structured XML of a PDF's text and layout, for document systems and data pipelines.

Processed on your device

or drop a PDF anywhere on this page. Files stay on this device.

How to convert a PDF to XML

To convert a PDF to XML, open it here and press Convert to XML. Puffin PDF reads the file in your browser and writes an XML document with a metadata section, the bookmarks, and a page element for each page holding line elements with their text, x and y position, font size and weight.

  1. Select a PDF, or drop it on this page.
  2. Leave XML selected.
  3. Press Convert to XML.
  4. Download the file.

Questions and answers

Is the XML valid?

Yes. Special characters are escaped and control characters removed, so any XML parser can read it.

Does it work on scanned PDFs?

A scan is a picture of a page, so it has no text to convert. Run OCR PDF on it first (also free and on your device), then convert the file OCR gives you.

Are my files uploaded?

No. The work is done by code running in your browser, so your file never leaves your device. You can check this yourself: open your browser's developer tools, switch to the Network tab and run the tool. No request carries your file.

Is it free? Are there limits?

Yes, it is free with no sign-up, no watermark and no daily limit. Because your own device does the work, it costs us almost nothing to run, so there is nothing to meter.

Other tools