Turn XML into a CSV HubSpot will take.
HubSpot imports spreadsheets, not XML. Paste an XML export or feed, pick the element that is one record, and download a flat CSV with every field as a column and a hint for the HubSpot property each one maps to. Free, no sign-up, and the file never leaves your browser.
2 rows, 6 columns
Columns and the HubSpot property they usually map to
| Column | Likely HubSpot property |
|---|---|
| contact@id | A unique custom property, or Record ID if it's HubSpot's |
| firstname | First Name |
| lastname | Last Name |
| company | Company Name |
| interests.item | Map by hand, or create a custom property |
Preview
| contact@id | firstname | lastname | company | interests.item | |
|---|---|---|---|---|---|
| 1001 | jane.doe@example.com | Jane | Doe | Example Co | Pricing;Webhooks |
| 1002 | sam.rivera@example.org | Sam | Rivera | Example Labs, Inc. |
Why HubSpot needs a CSV
HubSpot's record import takes spreadsheet files: CSV, XLSX or XLS, with one row per record and a header row it maps to properties. It doesn't read XML. So data that lives in XML, like an old CRM export, a partner feed or an event platform's attendee file, has to be flattened first. HubSpot's guide to formatting import files has the full rules.
Flattening is the hard part. XML nests and repeats; a spreadsheet doesn't. This converter turns each record into one row and every field into a column, so you can open it, check it and import it.
How the converter flattens XML
| XML | Column | What happens |
|---|---|---|
| <email>jane@example.com</email> | A child element becomes a column. | |
| <contact id="1001"> | contact@id | An attribute becomes element@attribute. |
| <address><city>Tampa</city></address> | address.city | Nested elements join with a dot. |
| <item>Pricing</item><item>Webhooks</item> | interests.item | Repeats join into one cell, with semicolons by default, the way HubSpot reads multiple checkbox values. |
| <![CDATA[Notes, with <tags>]]> | notes | CDATA comes through as plain text, quoted where needed. |
Before you import the CSV
- Rename the headers to match your HubSpot property labels, so the import maps them for you. The hint column shows the usual match.
- Keep a unique ID. Email for contacts and company domain for companies let HubSpot update records instead of creating duplicates. Our guide to imports without duplicates covers the rest.
- Fix formats. Dates in one format, dropdown values matching HubSpot's internal values, and multiple checkbox values separated by semicolons.
- Import a 20-row test first, check the records, then import the rest.
The full walkthrough, including loading XML through the HubSpot API instead, is in how to import XML into HubSpot. Checking a sitemap instead? Use the XML Sitemap Validator.
Is it safe to paste my data here?
The converter runs entirely in your browser. Your XML isn't uploaded, stored or sent anywhere, and the parser never follows links or loads external files named inside the XML.
The math
How we calculated this
The element that repeats becomes a row; its children and attributes become columns.
Rows
The element that repeats most, or the one you pick
Columns
Every child element and attribute, by path
Repeats
Values that repeat in one record are joined with your separator
What we assume
- Up to 50,000 records, all in your browser.
Rules of thumb
- HubSpot multiple checkbox properties take values joined with a semicolon.
Free, and staying free
If one of these saved you an hour, an optional $5 tip helps cover what it costs to run and build them. Nothing unlocks, and every tool stays free.
How to use the XML to CSV Converter
Paste your XML: an export, a feed or any file with repeating records.
Check the record element. The converter picks the one that repeats most; choose another if a row should be something else.
Pick how to join repeated values. Semicolons suit HubSpot's multiple checkbox properties.
Check the column list and the HubSpot property hint beside each one.
Download the CSV, rename headers to your property labels, and run a small test import first.
What the result means
Rows and columns
One row per record element, one column per field found in any record. Empty cells mean that record didn't have the field.
Column names
Child elements by name, nested ones joined with a dot, attributes as element@attribute.
Property hint
The HubSpot default property a column usually maps to. Blank means map it by hand or create a custom property.
Preview
The first 20 rows, so you can spot a wrong record element before you download.
Questions about this tool
Can HubSpot import XML files?
Not directly. HubSpot's record import takes spreadsheet files such as CSV, XLSX and XLS. Convert the XML to CSV first, or load it through the HubSpot API.
How does it handle nested XML?
Nested elements become columns joined with a dot, like address.city. Repeated elements inside one record are joined into one cell with the separator you pick.
What about attributes?
Each attribute becomes its own column named element@attribute, like contact@id.
How big a file can it convert?
It converts up to 50,000 records in your browser. Very large files may be slow on a phone; split them or use a script for millions of rows.
Is my data uploaded?
No. The conversion runs in your browser, and the parser never loads files or links named inside the XML.
Moving data into HubSpot?
20 minute fit call. You'll leave knowing the first thing we'd fix and roughly what it costs. If we're not the right fit, we'll tell you who is.