pdfcosmos

PDF to XML

Export your PDF's text to XML, privately, without uploading a thing.

Free, fast, and privacy-first.

Convert PDF to XML

or drag & drop files here

PDF filesup to 30 filesup to 100 MB each300 MB total

Convert PDF to XML: faithful, and fully private

Export a PDF's text into a simple XML structure you can transform, index, or diff. pdfcosmos reads the text in your browser, so your documents never leave your device.

The output uses a clear <document>/<page>/<line> schema with properly escaped text. It's a faithful text export, not a claim to any standard document schema.

  • Simple documented schema

    <document> → <page n> → <line>, with escaped text.

  • Private by design

    Extracted in your browser. Nothing is uploaded.

  • Batch to one ZIP

    Convert up to 30 files at once. Several download together as a ZIP.

How to convert PDF to XML

  1. Add your PDF(s)

    Drop one (or up to 30) PDF files into the upload area.

  2. Convert

    Click “Convert to XML”. The selectable text of each page is read in your browser.

  3. Download

    Each PDF downloads as an .xml file (a ZIP for several) using a simple <document><page><line> schema.

Frequently asked questions

Are my PDFs uploaded to a server?
No. Extraction runs entirely in your browser. Your files never leave your device. You can confirm it in your browser's Network tab: no file data is sent.
What XML schema is used?
A simple, documented one: a <document> root with a pages attribute, then a <page n="…"> per page containing a <line> per extracted line. Text is properly escaped. It doesn't claim any standard schema (JATS/NLM).
It says my PDF has no selectable text. Why?
The PDF is likely scanned (images with no text layer). Run it through OCR first, then convert the searchable PDF here.
Can I convert several files at once?
Yes. Add up to 30 files. One downloads as an .xml file, and two or more download together as a single ZIP.
Is PDF to XML free?
Yes, it's completely free to use, with no sign-up and nothing to install.