How to extract attachments from InfoPath forms
Files attached to InfoPath forms are stored inside the XML. Save them as normal files – free, in your browser.
When someone attaches a file to an InfoPath form, InfoPath doesn't store it separately: it puts the whole file inside the form's XML, encoded as text (base64) together with its name. That is why the attachments seem to disappear once InfoPath is gone.
Save the attachments
- Open the form with XSN Viewer (Choose files). The template is not needed for attachments.
- Open the Attachments tab: every attached file is listed with its name and size.
- Click Save next to a file, or Save all (ZIP) to get them all at once.
Attached files keep their original name and content. In the form itself you can also click an attachment to save it.
Many forms?
The XSN Viewer Windows app (Pro) extracts the attachments of a whole folder of forms in one go, in a folder for each form.
Frequently asked questions
What does an InfoPath attachment look like in the XML?
A long block of text that starts with x0lGQR: a small header with the file name, followed by the file, all encoded in base64.
Are pictures extracted too?
Pictures in picture controls are shown in the form. They are stored the same way, but without a file name.

Other guides
- How to open an InfoPath form without InfoPathView .xml forms with their original layout, in your browser.
- How to convert InfoPath forms to PDFKeep a PDF copy of every form, with the original layout.
- InfoPath retirement: what to do with your formsDates, what still works and how to archive old forms.
- Where to find the InfoPath template (.xsn)The template brings back the original layout. Here is where it is.
- How to export InfoPath form data to ExcelOne row per form, one column per field.
- What is an .xsn file and how to open itThe InfoPath template: what it contains and how to view it.