HTML in "Body (HTML)" field breaks during CSV import – how can I safely upload complex HTML?

Hello,

I’m trying to bulk upload using a CSV file. Each product needs rich HTML content in the “Body (HTML)” field, including and nested tags with styles and links.

The problem is that after importing, the HTML structure gets badly broken:

Here’s what I’ve already tried:

  • Replacing all double quotes (") with single quotes (')

  • Escaping ampersands (& → &)

  • Flattening the HTML into a single line

All of these methods still result in broken HTML upon import.

I’m aware that Shopify has limitations when importing HTML via CSV, and that metafields or APIs may be a better option. But before I go that route, I’d like to know:

  1. Is there a known safe way to embed full HTML (including nested tags) in the “Body (HTML)” field during CSV import?

  2. Are there Shopify apps or recommended workflows for handling this kind of use case (e.g. Metafields Guru, Admin API, etc.)?

Any advice or real-world examples would be greatly appreciated. I just want a scalable way to manage this without manually editing 1,000+ products.

Thank you!

You’re right—Shopify’s CSV import often breaks complex HTML, especially with nested links, buttons, and special characters. Even with escaping characters or flattening the code, it still misinterprets tags. Unfortunately, there’s no fully reliable way to include rich HTML like that in the “Body (HTML)” field via CSV. For better results, using the Shopify Admin API or an app like Metafields Guru is recommended. These tools let you upload clean, structured HTML at scale without the formatting issues that happen with CSV imports.

Hi @mdglobal

Instead of opening it in local excel, upload it in Google sheets, make edits there and then download it back, it should fix your issue

Thanks!

Agree with @pawankumar – this is not a Shopify import, rather the way Excel creates CSV files. Google Sheets are much safer.

Also – Matrixify (https://apps.shopify.com/excel-export-import) makes a lot of import/export tasks easier.

Thanks for the answer, but I’ve already been using Google sheets and it didn’t fix the problem.

Hi @mdglobal ,

Would you be able to share the first couple rows of the CSV file here? That might make it easier to see exactly what’s going on?

You should be able to embed the HTML in the CSV file but things like escaping, line breaks and character encodings can make it a little tricky.

Best,
Daniel