Detailed Structure Extraction
Extracts font sizes, coordinates, text blocks, and page boundaries into a clean XML tree.
Extract text, fonts, coordinates, and layout parameters from your PDF files into a structured XML file. Perfect for programmatic parsing.
PDFs are designed for presentation, not for data processing. They describe where characters should be placed on a page, but they lack semantic structure. There is no concept of a "paragraph," a "table," or a "heading" in raw PDF data, making it incredibly difficult to write programs that extract data from them.
Our PDF to XML converter solves this challenge. It parses the PDF's internal layout using PyMuPDF and extracts page boundaries, text blocks, lines, character spans, fonts, sizes, colors, and coordinates, mapping them into a clean, structured XML tree. This turns unstructured document layouts into structured, machine-readable XML data.
Convert your PDFs to XML when you need:
x, y, width, height) of text blocks, lines, and images to analyze document structures or train machine learning models.bbox attribute defining its precise bounding box on the page.A logistics company receives thousands of shipping invoices as PDFs. To automate billing, they convert the PDFs to XML, allowing their parsing scripts to locate and extract invoice numbers, dates, and line items based on their coordinate bounding boxes.
Researchers want to extract section titles and paragraphs from a library of academic PDF papers. They convert the PDFs to XML, allowing their scripts to identify headers by filtering tags with larger font sizes and bold attributes.
An enterprise migrates historical records from static PDFs to a structured XML CMS. They use the tool to extract the raw text content alongside its page layout structure, preserving the reading order of the document.
bbox) are expressed in standard PDF points (72 points per inch) originating from the top-left of the page. Use these coordinates to group lines or detect columns in your code.What does the output XML look like?
The output is a structured XML tree with a root <document> tag. It contains <page> tags (with width and height attributes), which contain <block> tags (representing paragraphs), <line> tags, and <span tags (with text content, font, size, and color attributes).
Can this tool extract images?
The tool detects image blocks and includes their positions and dimensions as <image> tags in the XML, but it does not extract the raw image files themselves.
Will it extract tables? Yes. The text inside tables will be extracted within block, line, and span tags along with their positioning coordinates, allowing you to reconstruct the table grid programmatically.
Is there a page limit? We support PDF documents up to 100MB, accommodating documents with hundreds of pages.
Are my files kept private? Yes. All file transfers are secured via HTTPS. Documents are processed ephemerally on our secure servers and permanently deleted shortly after conversion. We do not inspect or share your files.
Built with the same craft as a native app — in a browser tab.
Extracts font sizes, coordinates, text blocks, and page boundaries into a clean XML tree.
Output is fully structured XML, ideal for processing in Python, Node.js, or importing into databases.
Segments the document tree by page, block, and line nodes to preserve layout information.
Files are handled over secure connections and deleted automatically after processing.
Simple, fast, and totally free.
Select the PDF file you want to extract XML from.
Select extraction parameters or stick to the default structured parsing.
Download the converted `.xml` file containing the extracted data.
Practical applications for this tool.
Extract invoice or report data from PDFs into XML files to load into automated ERP databases.
Analyze the layout and structural syntax of documents for academic research or NLP preprocessing.
Answers to the questions people ask most about PDF to XML.
Great pairings with PDF to XML.