How to Add Custom CSS to a Shopify Theme

Add small style changes in the theme editor: Theme settings, then Custom CSS for the whole store, or Custom CSS at the bottom of a section's settings for one section. Theme CSS is limited to 1,500 characters and section CSS to 500, and neither works on checkout. Duplicate your theme first and recheck the CSS after theme updates.

By Charles · Published · Updated

Illustration of a storefront on a laptop linked to a code card with a paintbrush

You add custom CSS in the theme editor: open Theme settings and choose Custom CSS to style the whole store, or open a section and use its Custom CSS box to style only that section. Shopify caps theme-wide CSS at 1,500 characters and section CSS at 500.

For what to check when a theme changes underneath your styles, see our guide to Shopify theme updates and customizations. Want a style change done for you? Send a project brief to discuss the work.

Key facts

  • Custom CSS can apply to your entire theme or to one section, and is not supported on the Checkout page. Shopify Help Center, checked 10 November 2026.
  • Theme-wide custom CSS is limited to 1,500 characters; section CSS is limited to 500. Shopify Help Center, checked 10 November 2026.
  • Custom CSS overrides your theme's built-in settings, so it takes precedence over them. Shopify Help Center, checked 10 November 2026.

Where do you add custom CSS in Shopify?

You add it in the theme editor, at the theme level or the section level. Shopify describes both in Adding custom CSS to your theme, checked 10 November 2026.

Whole theme One section
Where Theme settings, then Custom CSS. The section's settings panel, Custom CSS at the bottom.
Reaches Every page in the online store except Checkout. Only that section.
Character limit 1,500. 500.
Example from Shopify Change how buttons look across the store. Set a font size or background color for one section.

The steps for the whole theme are: from your Shopify admin go to Online Store, click Edit theme, click Theme settings, click Custom CSS, add your code and click Save. For a section, click the section instead of Theme settings and open Custom CSS at the bottom of its panel.

Shopify's developer documentation says the Custom CSS setting is provided by the platform at both levels, and that it is intended to let merchants customize the look and feel of a storefront without editing theme code (Shopify settings documentation, checked 10 November 2026).

What can't custom CSS do?

Several selectors and properties are blocked, and the boxes are small. Shopify's list of considerations, checked 10 November 2026, includes:

  • The at-rules @import, @charset and @namespace cannot be used.
  • Section-level CSS can use only the at-rules @media, @container, @layer and @supports.
  • Section-level CSS cannot target the ID or classes of the wrapping Shopify section element, which carries the shopify-section class.
  • The content property is not available.
  • Only the https://cdn.shopify.com domain is permitted for URLs in custom CSS.
  • Custom CSS is not supported on the Checkout page.

Custom fonts are not restricted, but Shopify says they are separate resources that browsers download before text renders, and it is your responsibility to make sure they do not harm performance. Check the result with our Shopify speed guide.

If you hit a limit, the change moves from the editor box into theme code. Shopify says it does not support advanced theme customizations.

How do you add custom CSS safely?

Work on a copy of the theme, change one thing at a time and preview before you publish. Shopify says it is a good idea to duplicate your theme before customizing it so you can discard changes and start again (checked 10 November 2026).

  1. Duplicate the live theme and open the copy in the theme editor.
  2. Find the element you want to change. Your browser's developer tools show the selector the theme uses for it.
  3. Add the rule at the right level, theme-wide or section, and save.
  4. Preview on mobile and desktop, and on the pages that use the section.
  5. Keep a note of each rule and why you added it, so you can find it later.

Remember the precedence. Because custom CSS overrides built-in theme settings, a forgotten rule can make a setting look as if it has stopped working. When a theme setting seems ignored, check the Custom CSS boxes first.

What happens to custom CSS when you update a theme?

It may stop working, so check it on the updated copy before you publish. Shopify says updating your theme might cause custom CSS to stop functioning, depending on the selectors or classes you used. Its updating themes guide, checked 10 November 2026, says editor customizations are copied to the updated theme, and that if you added custom CSS you should check the selectors still exist in the latest version and that your CSS is applied as expected.

Use the updated draft to do that check, then publish. Our theme update guide walks through what to save and review.

When is a style change a developer job?

When it needs more than the editor boxes allow, or when the change is a bug on a live store. A Liquid or CSS fix is one of the examples in our Quick Fix package, which covers one bug or small change on a live Shopify store for a fixed $299 USD. That is an example, not a promise that every request fits the package.

If you want a new section styled and built, see our guide to custom theme sections. To send a CSS request, describe the page, what looks wrong and what you expect, and we will confirm the fit and send a fixed quote within one business day before you pay. Browse the Shopify fixes service and read how a project works first if you want the steps.

Frequently asked questions

Where do I add custom CSS in Shopify?

In your admin go to Online Store, click Edit theme, then Theme settings and Custom CSS for the whole store. For one section, click that section in the theme editor and open Custom CSS at the bottom of its settings panel.

Is there a character limit for Shopify custom CSS?

Yes. Shopify limits CSS that affects the entire theme to 1,500 characters and CSS that affects a specific section to 500 characters.

Does custom CSS work on the Shopify checkout page?

No. Shopify says custom CSS is not supported on the Checkout page.

Will my custom CSS keep working after a theme update?

Not necessarily. Shopify says updating your theme might stop custom CSS from working, depending on the selectors or classes you used. Check that your selectors still exist and that the CSS is applied before you publish an updated theme.

Have a style fix to hand over? Send a project brief with the page and what should change.