Magento 2 Import Categories CSV: The Complete Guide
Magento 2 Category CSV: Import, Export & Bulk Management

Magento 2 Category CSV: Import, Export & Bulk Management

6 min read 38 views

Can you import and export Magento 2 categories as CSV?

Not natively: Magento 2 has no built-in category export or import, so there is no supported way to pull your category tree into a spreadsheet, edit it, and re-import it — that capability needs a module. The native importer at System → Data Transfer → Import handles products, and its only category behaviour is creating missing categories named in a product's categories column while appending those assignments to whatever the product already has.

That surprises most store owners, because the admin manages categories one screen at a time at Catalog → Categories. Fine for a dozen categories; painful for a tree of hundreds when you need to rename, re-parent, fix URL keys or fill in SEO metadata across the lot. This guide covers what the native tools actually do, the two distinct CSV jobs people conflate, and a clean re-taxonomy workflow.

What the native product import does with categories

The product CSV's categories column takes full category paths — root to leaf — and does two things on import:

  1. Creates any category in the path that does not exist yet. Useful for first loads; dangerous for typos, because a misspelt path silently creates a duplicate branch of your tree.
  2. Assigns the product to the categories listed — additively. The import adds what is in your file and never removes existing assignments. This is the append trap: re-categorise a product by CSV and it ends up in both the new and the old category.

What the native import cannot do at all: export the tree, update an existing category's name, URL key, description, status or meta fields, re-parent a category, or reorder anything. Category data simply is not an entity the importer knows how to edit.

The two distinct jobs (and the right tool for each)

JobNative Magento 2Module route
Export the category tree to CSVNot availableCategory Manager — pull the whole tree to CSV
Bulk-edit names, parents, URL keys, SEO metaOne category screen at a timeCategory Manager — edit in a spreadsheet, re-import to update or create
Assign products to categories by CSVProduct import, but append-onlyImport Category Replace — the CSV column becomes the product's complete category set
Create missing categories from product pathsYes (watch for typo-created duplicates)Same, with the tree itself managed deliberately

Keep the two jobs separate in your head: managing the tree is category data; assigning products is product data that happens to reference categories. Most botched re-organisations come from trying to do both through the product import alone.

A clean re-taxonomy workflow

  1. Export the category tree to CSV and restructure it in your spreadsheet — names, parents, URL keys, descriptions, meta titles. Re-import to update existing categories and create the new ones.
  2. Prepare the product CSV with each product's final, complete category list — treat the file as the single source of truth, not a delta.
  3. Import with replace behaviour on, so stale assignments are removed in the same pass rather than appended alongside.
  4. Reindex and flush: bin/magento indexer:reindex, then bin/magento cache:flush.
  5. Spot-check the storefront: layered navigation, category product counts, and Marketing → SEO & Search → URL Rewrites for the categories whose URL keys changed. If old category URLs had traffic, make sure redirects exist before you call it done.

For the sweeping product-side changes that usually ride along with a re-taxonomy — prices, status, attribute values — see Magento Bulk Edit Products: Native Options vs Mass Actions. And because a restructure moves URLs and metadata around, it is worth running the broader checks in our Magento 2 SEO checklist once the dust settles.

Practical rules for working with the category CSV

  • Keep the untouched export as your rollback. A category import has no undo; the original export re-imported is the fastest way back if a restructure goes wrong. Save it before you edit a single cell.
  • Change URL keys deliberately, not casually. Every changed key is a moved URL, which means a rewrite or redirect to manage. Rename display names freely; touch URL keys only when the old one is genuinely wrong.
  • Import the tree before the products. The category structure must exist before product rows reference it, otherwise the product import creates categories from paths — without the descriptions, meta and settings you prepared.
  • Work at the right scope. Category names and meta can differ per store view; decide whether you are editing default values or a specific store view before you export, and keep the two jobs in separate passes.

Why spreadsheets beat the category screens for bulk work

A CSV of the whole tree makes problems visible that the admin hides: duplicate names under different parents, missing meta descriptions, inconsistent URL-key conventions, empty description fields. You can sort, filter and fill them in minutes, then re-import once. The same file doubles as documentation of the taxonomy — useful when a merchandiser, an agency and a feed all need to agree on what the tree looks like. One screen at a time, none of that is practical past a few dozen categories.

FAQ

Can Magento 2 export categories to CSV natively?

No. The native import/export at System → Data Transfer covers products and a few other entities, but not the category tree. Category export and import needs a module such as Category Manager, or custom code.

Why are my products still in old categories after an import?

Because the native product import appends category assignments rather than replacing them — it adds what is in the file and never removes anything. You need replace behaviour to make the CSV authoritative for each product's category set.

Can the product import create new categories?

Yes — any category path in the categories column that does not exist is created during import. That is also why typos are dangerous: a misspelt path quietly creates a duplicate branch rather than failing.

Do these tools work on any Magento 2 store?

Yes — they operate on the admin and import side, so they work identically on a Luma storefront or a headless build. Built against Magento Open Source 2.4.9, running on PHP 8.4 and 8.5.

Both modules are one-off purchases — no subscription — and are included in the AgenticEcom Suite.