JSON ↔ SQL Converter

Convert instantly in your browser. Max file size: 100 MB. Nothing is stored on the server.

Free: 6 / 6 left today • 100 MB
Input
Drop file to upload
Output

Need to convert CSV to XML, or pull an XML file or sitemap back into a spreadsheet? This free CSV to XML converter works in both directions. Paste your data or upload a file, choose how the XML should be structured, and download a clean result in seconds. The same tool turns XML, RSS feeds and sitemap.xml files into CSV so you can sort, filter and audit them in Excel or Google Sheets.

CSV to XML converter diagramA CSV table on the left is converted into XML tags on the right, with arrows showing conversion in both directions.CSVid, name, price1, Hoodie, 39.002, Mug, 12.503, Cap, 18.00CSV → XMLXML → CSVXML<products><product><id>1</id><name>Hoodie</name><price>39.00</price></product> …</products>
Each CSV row becomes an XML record, and each column header becomes a tag. The tool also converts in reverse.

What is a CSV to XML converter?

A CSV to XML converter reads a comma-separated values file and rewrites it as an XML document. CSV stores data as plain rows and columns. XML wraps every value in a named tag, so the result describes itself and can be read by feeds, APIs, ERP systems and import tools that do not accept spreadsheets.

If you have ever tried converting a CSV file to XML by hand, you know the problem: one missed quote or an unescaped & and the whole file is rejected. A converter handles escaping, tag naming and indentation for you, so the output is well-formed from the first run.

How to convert CSV to XML in three steps

Three steps: add CSV, set options, download XML1Add your CSVPaste text or upload a file2Set the optionsDelimiter, root tag, row tag3Copy or downloadGet a valid .xml file
The CSV to XML conversion tool in three steps.
  1. Add your data. Paste CSV into the input box or upload a .csv file. Tick “first row is column names” if your header row should become the tag names.
  2. Choose the options. Pick the field separator (comma, semicolon, tab or pipe), the root element name and the record name, and decide whether to pretty-print or minify the output.
  3. Convert and export. Click Convert, check the preview, then copy the XML or download it as a .xml file.

Example

This input:

sku,title,price
A100,Canvas Tote,24.00
A101,Steel Bottle,18.50

produces this XML when the root is catalog and the record name is item:

<?xml version="1.0" encoding="UTF-8"?>
<catalog>
  <item>
    <sku>A100</sku>
    <title>Canvas Tote</title>
    <price>24.00</price>
  </item>
  <item>
    <sku>A101</sku>
    <title>Steel Bottle</title>
    <price>18.50</price>
  </item>
</catalog>
Tip: XML tag names cannot contain spaces or start with a number. Use headers like unit_price instead of Unit Price to keep the output valid.

How to convert XML to CSV

To convert .xml to CSV, switch the tool to XML to CSV mode and paste or upload your document. The converter finds the repeating element, uses its child tags as column headers, and writes one CSV row per record. Open the result in Excel, Google Sheets or any database import wizard.

This works well for product feeds, exported orders, RSS items and any flat XML list. For deeply nested XML, you may prefer to convert XML to JSON first so the hierarchy stays intact, then flatten only the fields you need.

Convert a sitemap XML to CSV

SEO audits are easier in a spreadsheet. A sitemap lists every URL as a <url> block, and this converter turns each block into a row so you can filter by last modified date, spot duplicate paths or compare two sitemaps side by side.

Sitemap XML converted to a CSV spreadsheetA sitemap.xml file with url, loc and lastmod tags becomes a table with loc and lastmod columns.sitemap.xml<url><loc>https://example.com/</loc><lastmod>2026-10-01</lastmod></url><url> … </url>to CSVloclastmodhttps://example.com/2026-10-01https://example.com/blog/2026-09-24https://example.com/shop/2026-09-18…
A sitemap to CSV conversion gives you one row per URL.

Paste the contents of your sitemap (or a sitemap index) and the tool returns a table you can sort. The format follows the , so loc, lastmod, changefreq and priority each get their own column. Running a WordPress site? Our WordPress query generator pairs well with a URL list for bulk content checks.

Features of this CSV, XML, RSS and sitemap converter

Two-way conversion

CSV to XML and XML to CSV in one place, including RSS feeds and sitemaps.

Custom tag names

Set your own root element and record name so the output matches the schema your system expects.

Any delimiter

Comma, semicolon, tab, pipe or a custom field separator, with a configurable quote character.

Header row control

Use the first row as tag names, or generate column names automatically.

Clean formatting

Pretty-print with indentation or minify for smaller files. Special characters are escaped for you.

UTF-8 ready

Accented and non-Latin text stays intact, with an XML declaration added on request.

Why use this tool? Benefits of XML to CSV and CSV to XML

Four benefits: fast, accurate, private, freeValid outputEscaped, well-formed XMLFastConvert large lists in secondsPrivateYour data is not stored$0FreeNo sign-up required
What you get from a dedicated CSV to XML conversion tool.
  • Fewer import errors. Many marketplaces, accounting packages and integration platforms accept XML only. Converting CSV to XML in the right structure avoids rejected uploads.
  • Easier analysis. The benefit of XML to CSV is that flat data opens instantly in a spreadsheet, where you can use pivot tables, filters and formulas.
  • Less manual work. Copying hundreds of rows into tags by hand is slow and error-prone. The tool does it consistently every time.
  • Clear structure. XML adds context to every value, which helps when several teams or systems share the same file.
  • Works without software. Nothing to install, and it runs on any device with a browser.

CSV and XML compared

Feature CSV XML
Structure Flat rows and columns Nested tags and attributes
File size Small Larger because of repeated tags
Readability Best in a spreadsheet Self-describing, readable by people and software
Data types Everything is text Can be paired with a schema (XSD)
Typical use Exports, bulk edits, analysis Feeds, APIs, sitemaps, config, system integration

CSV is defined in , and XML is maintained by the W3C in the . If you work with web APIs more often than feeds, you may also want a JSON to CSV converter or a way to convert JSON to XML online.

Common use cases

  • Product feeds: turn a WooCommerce or inventory export into an XML feed for a marketplace or comparison site.
  • RSS and content imports: build a simple RSS-style XML file from a spreadsheet of posts, then check it with an XML formatter.
  • ERP and accounting systems: prepare data for platforms such as SAP or invoicing software that expect XML messages.
  • SEO audits: convert an XML sitemap to CSV, then review URLs, dates and priorities in bulk.
  • Data migration: move records between systems that disagree on format.

Once your XML is generated, run it through the XML minifier and beautifier to tidy the indentation or shrink the file for production.

Fixing common conversion problems

Problem Likely cause Fix
Everything lands in one column Wrong delimiter Switch the field separator to semicolon, tab or pipe
Invalid tag names Headers contain spaces or start with digits Rename headers to snake_case or camelCase
Broken characters File not saved as UTF-8 Re-save the CSV as UTF-8, or choose the matching encoding
Fields are missing Rows have unequal column counts or unclosed quotes Check that every row has the same number of fields
Values with commas split apart Missing quotes around the text Wrap the value in double quotes
Nested data needed CSV is flat by nature Convert to flat XML first, or go via JSON

Frequently asked questions

What is a CSV to XML converter?

It is a tool that reads CSV data and writes it as an XML document, using your column headers as tag names and each row as one record.

How do I convert a CSV file to XML?

Paste or upload the CSV, set the delimiter, root tag and record tag, then click Convert and download the XML file.

How do I convert XML to CSV?

Switch to XML to CSV mode, add your XML, and the tool turns each repeating element into a row with its child tags as columns.

Can I convert a sitemap XML to CSV?

Yes. Paste your sitemap and every URL entry becomes a CSV row with columns for loc, lastmod, changefreq and priority where they exist.

Does the converter support RSS feeds?

Yes. RSS items are repeating elements, so they convert to CSV the same way, and a CSV of posts can be written out as RSS-style XML.

Is it free and is my data safe?

The tool is free with no account needed. Your input is used only to produce the result and is not kept.

Can I convert CSV to XML in Excel instead?

Excel can export XML only when an XML map is set up first, which is slow for quick jobs. A dedicated converter skips that setup.

More free developer tools

Working across formats? Try the JSON to Excel converter, or browse the full athemeart developer tools collection.