Free XML to CSV Converter

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.

An export, a feed or any XML file. Nothing leaves your browser. Up to 50,000 records.
We pick the element that repeats most. Choose another if a row should be something else.
When a field repeats inside one record, join the values with

2 rows, 6 columns

Columns and the HubSpot property they usually map to

ColumnLikely HubSpot property
contact@idA unique custom property, or Record ID if it's HubSpot's
emailEmail
firstnameFirst Name
lastnameLast Name
companyCompany Name
interests.itemMap by hand, or create a custom property

Preview

contact@idemailfirstnamelastnamecompanyinterests.item
1001jane.doe@example.comJaneDoeExample CoPricing;Webhooks
1002sam.rivera@example.orgSamRiveraExample 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

How each XML shape becomes a CSV column
XMLColumnWhat happens
<email>jane@example.com</email>emailA child element becomes a column.
<contact id="1001">contact@idAn attribute becomes element@attribute.
<address><city>Tampa</city></address>address.cityNested elements join with a dot.
<item>Pricing</item><item>Webhooks</item>interests.itemRepeats join into one cell, with semicolons by default, the way HubSpot reads multiple checkbox values.
<![CDATA[Notes, with <tags>]]>notesCDATA comes through as plain text, quoted where needed.

Before you import the CSV

  1. Rename the headers to match your HubSpot property labels, so the import maps them for you. The hint column shows the usual match.
  2. 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.
  3. Fix formats. Dates in one format, dropdown values matching HubSpot's internal values, and multiple checkbox values separated by semicolons.
  4. 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.

  1. Rows

    The element that repeats most, or the one you pick

  2. Columns

    Every child element and attribute, by path

  3. 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.

Buy us a coffeeTip us for the free tools (optional tip, $5 suggested, opens Stripe in a new tab)

How to use the XML to CSV Converter

  1. Paste your XML: an export, a feed or any file with repeating records.

  2. Check the record element. The converter picks the one that repeats most; choose another if a row should be something else.

  3. Pick how to join repeated values. Semicolons suit HubSpot's multiple checkbox properties.

  4. Check the column list and the HubSpot property hint beside each one.

  5. 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.