Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I'm trying to bulk upload using a CSV file. Each product needs rich HTML content in the "Body (HTML)" field, including <button> and nested <a> tags with styles and links.
The problem is that after importing, the HTML structure gets badly broken:
<a> tags get embedded inside style attributes
& characters are auto-converted to &, causing links to break
Closing tags like </a> are missing or misinterpreted
In Shopify, the button/link no longer works as intended
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:
Is there a known safe way to embed full HTML (including nested <a> tags) in the “Body (HTML)” field during CSV import?
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!
Thanks for the answer, but I've already been using Google sheets and it didn't fix the problem.
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.
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
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025