Ecom Store Pro

What is the character limit for Custom CSS in a Shopify theme?

Updated ·
At a glance
Short answer
Shopify theme Custom CSS is limited to 1,500 characters for the whole theme and 500 for a specific section.
Where each limit applies
Theme settings > Custom CSS (whole theme); Custom CSS at the bottom of a section's properties panel.
Not covered
Checkout: Custom CSS isn't supported on the Checkout page.
Beyond length
Some at-rules, the content property and, currently, URLs outside cdn.shopify.com are blocked too.
Editor changes on a theme update
Theme Store themes: theme editor customizations are copied over; recheck that your selectors still exist.
Code edits on a theme update
Included if they don't conflict; if incompatible, all your code changes are removed in the updated copy.

How many characters does Custom CSS allow?

Shopify's Help Center caps both levels of Custom CSS: CSS rules that affect the entire theme are limited to 1,500 characters, and rules that affect a specific section to 500.

The theme-wide field, under Theme settings > Custom CSS, affects all online store pages except Checkout, where Custom CSS isn't supported. The section field sits at the bottom of the section's properties panel, and its CSS is scoped to that section.

What else does Custom CSS restrict?

If your Custom CSS isn't working, length isn't the only rule to check:

  • The at-rules @import, @charset and @namespace cannot be used.
  • Section-level CSS permits only @media, @container, @layer and @supports.
  • The content property isn't available.
  • URLs may currently come only from the cdn.shopify.com domain.

Custom CSS also outranks your theme's settings: Shopify says its changes take precedence over your theme's built-in settings. If a setting seems to do nothing, check for a Custom CSS rule on the same element.

Stay in Custom CSS or move to theme code?

For adjustments the theme editor can't make, Shopify points to editing your theme's code — but only if a Shopify app can't make the change either.

Staying in the editor: on themes installed from the Shopify Theme Store, customizations made using the theme editor are copied over to the updated theme, and Shopify's 2023 announcement of Custom CSS said themes would transfer their custom CSS automatically. After a theme update, check that your selectors still exist in the new version: an update might stop your CSS from working.

Moving to code: code edits are included in the update if they don't conflict with it; if they are incompatible, all your code changes are removed in the updated copy. Shopify lists customizing or troubleshooting themes with significant code changes among tasks it can't help with.

Before you edit theme code
Duplicate the theme so you can discard your changes and start again, and save a copy of your customized code before any theme update.
About This Article

This page was written by AI. Separate AI agents that did not write it check its figures and claims against official sources and test its links and interactive tools. A human editor sets the site's editorial direction, topics and rules and checks that pages are complete and display correctly, but does not check their facts or edit their text. Details may change — always confirm critical data at shopify.com.

Editorial Policy

Related questions

Products & inventory
How do you create a second collection template in Shopify?

In the theme editor pick Collections, click Create template, then set Theme template on each collection — not on Starter or a Vintage theme.

October 22, 2026

Online store & themes
How do you edit the Shopify blog post template in code?

In Edit code, templates/article.json (Online Store 2.0) names the post's section; that section's file and any theme blocks it renders hold the code.

October 21, 2026

Online store & themes
How do you set a focal point on an image in Shopify?

Click an image in Files, the theme editor or a product, then click its spot and Save; works on supported themes only.

October 15, 2026

Stay updated

Get notified about new articles

Subscribe to receive updates when we publish new Shopify guides and insights.