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

Topic summary

A user is experiencing broken HTML when bulk importing products via CSV to Shopify. Complex HTML content in the “Body (HTML)” field—including nested <a> tags, buttons, and special characters—gets corrupted during import: tags embed incorrectly into style attributes, ampersands auto-convert breaking links, and closing tags disappear.

Attempted solutions that failed:

  • Replacing double quotes with single quotes
  • Escaping ampersands manually
  • Flattening HTML to single lines
  • Using Google Sheets instead of Excel

Community responses suggest:

  • CSV imports inherently struggle with rich HTML; no fully reliable workaround exists for this method
  • Alternative approaches: Shopify Admin API or apps like Metafields Guru for cleaner, scalable HTML uploads
  • Matrixify app recommended for easier import/export tasks
  • One responder requested sample CSV rows to diagnose the specific encoding/escaping issue

Current status: The issue remains unresolved. The user needs a scalable solution for 1,000+ products without manual editing.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

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!

1 Like

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