This guide shows how to add a badge to a Shopify product in three ways: switch on the badges your theme already has, write a few lines of Liquid in a Custom Liquid block, or use an app that adds badges through an app embed. Which one fits depends on what the badge has to say and where it has to show.
Key takeaways
- Sale and Sold out badges come from your theme: they need a compare-at price above the price, and tracked inventory with "Continue selling when out of stock" off.
- Badges you code yourself must be added twice, on the product page and on the product card, because they are different theme code.
- A badge app adds other badge types with a switch in the theme editor and no theme file edits; in Nileva Product Labels & Badges a new badge goes live on its first Save.
- Whatever route you take, check the badge as a shopper would, on desktop, on mobile and on collection pages.
Before you start: what do you want the badge to say?
Most badges answer one question: is it on sale, sold out, shipped free, ending soon? The answer decides the route. If you only need "Sale" and "Sold out", your theme may already do it, and Way 1 is all you need. If you need custom product badges with your own words, such as "Handmade" on a few products, you need code (Way 2) or an app (Way 3).
Decide two more things: where the badge must appear (the product page only, or also the product cards on collection pages, search results and the home page), and which products carry it. Our article on Shopify product labels vs badges explains how each word is used, and the guide to Shopify product badges covers every badge type.
Way 1: use your theme's built-in badges
Shopify's Help Center says that "Sale and Sold out badges are automatically added to your product images when you reduce the price or when the inventory count reaches 0", and that you can "adjust the position, shape, and color of your Sale and Sold out badges individually in your theme settings" (Shopify Help Center: theme settings). The only other badges that page names are Page and Blog badges in search results, so for products this route covers exactly two messages, and it needs no code.
Turn on the Sale badge
The Sale badge follows the product's prices. In your Shopify admin, go to Products and open the product (for a product with variants, open each variant). In the Price section, click Compare at, enter the original price in the Compare-at price field and the new price in the Price field, then click Save. Shopify's Help Center adds: "Make sure that the value in the Compare-at price field is higher than the value in the Price field to display the sale price" (Shopify Help Center: sale pricing).
Turn on the Sold out badge
The Sold out badge follows inventory. Shopify's definition is: "An item is out of stock when inventory is tracked and the inventory level is at zero or below" (Shopify Help Center: selling when out of stock). So turn on the product's Inventory tracked setting, or the theme cannot know it is sold out. Check one more setting: with Continue selling when out of stock on, Shopify lets "customers buy out of stock items", and Dawn's card code shows Sold out only for a product that can no longer be bought.
Change where the badge sits and its colors
Shopify's Dawn theme code (version 16.2.0 on GitHub, read on 2026-11-18) has a Badges group in the theme settings with "Position on cards" (Bottom left, Bottom right, Top left, Top right; bottom left by default), a corner radius, and separate color schemes for the Sale and the Sold out badge (Shopify/dawn on GitHub). Horizon has a similar Badges group (Shopify/horizon on GitHub). The limit of this route is the wording. Dawn prints the words "Sale" and "Sold out" from the theme's language file and computes no percentage, so every reduced product shows the same word.
Way 2: add a badge with a Custom Liquid block
If your theme offers a Custom Liquid block, you can write your own badge in Liquid, Shopify's template language. Shopify's Dawn theme code includes a block called Custom Liquid in its product information section, with one field, "Liquid code"; Horizon's code has a Custom Liquid block too. Go to Online Store → Themes → Edit theme, choose the product template from the page menu at the top of the editor, then click Add block in the product information section, choose Custom Liquid if it is listed, paste your code and click Save.
A short example that shows a word for sold-out and reduced products:
{%- if product.available == false -%}
<span class="my-badge">Sold out</span>
{%- elsif product.compare_at_price > product.price -%}
<span class="my-badge">Sale</span>
{%- endif -%}In Shopify's Liquid reference, product.compare_at_price is "the lowest compare at price of any variants of the product", product.price is "the lowest price of any variants of the product", and product.available is true "if at least one of the variants of the product is available" (Shopify Liquid: the product object). So the badge describes the product as a whole, not the variant a shopper picked. Add CSS for .my-badge, or it shows as plain text.
The trap: product page and cards are separate code
A Custom Liquid block on the product template puts the badge on the product page only. Product cards are drawn by other code: in Dawn, card badges come from the product card snippet, and the badge next to the price on the product page comes from the price snippet. To show your badge on collection pages too, you must edit the card code as well, which means editing theme files. Our article on Shopify badges on collection pages explains how cards differ from theme to theme.
Code you add lives in that theme. On an update, Shopify copies "Any customizations made to your theme using the theme editor", a Custom Liquid block included, but keeps file edits only if they don't conflict with the update; otherwise it marks the updated theme "Theme added: code edits could not be included" and you copy them over yourself (Shopify Help Center: updating themes). A different theme has neither, so you add both again.
Way 3: how to add a badge to a Shopify product with an app
A Shopify product badge app needs no code: Nileva Product Labels & Badges draws badges through an app embed and an optional "Product Badges" app block (a second block, "Free Shipping Bar", shows a progress bar, not badges), and it does not edit your theme files, the way Shopify's Built for Shopify requirements ask of storefront apps.
Step 1: turn on the app embed
In your Shopify admin, go to Online Store → Themes → Edit theme → App embeds (the icon in the sidebar), click the toggle beside the Nileva Product Badges app embed (Product Badges & Labels), then click Save (Shopify Help Center: apps in your theme).
The shortcut: in the app's Dashboard, open the Setup guide step "Show badges on your storefront" and click Open theme editor. It opens your published theme at App embeds with the embed switched on for you, so you only click Save. The step ticks itself once the embed is on.

The Setup guide reads your published theme. If you switch the embed on in a theme you have not published yet, the step stays unticked until that theme goes live.
Step 2: create the badge
- In the app, open Badges and click Create badge.
- In the Design tab, pick the Badge type first: Trust badge, Sale, Low stock, Free shipping, Reviews rating (Pro), Image / Sticker (Pro) or Countdown (Free with an end date; a start date is Pro). Changing the type swaps in that type's default text and settings, so choose it before you edit anything else.
- For a text badge, write the Badge text, then pick an icon, a shape and colors (a Sale badge left on "Auto from compare-at price" shows the percentage instead of the text).
- Rename the badge in the field above the preview (a new one is called "Secure checkout"); shoppers never see the name.
- In the Products tab, under Applies to, leave "Show on" at All products, or pick Specific products, Collections, Product tags, Product type, Vendor or Combination (advanced). Targeting other than All products is part of Pro.
Step 3: check the Active switch, then save
The Active switch sits in the toolbar above the live preview, and a new badge starts with it on. So the first time you click Save in the save bar, the app shows "Badge created" and the badge goes live, as long as the embed is on. To prepare a badge without showing it, turn Active off before you save. Only Active badges show, and only a duplicated badge starts as a Draft.
Watch one type. A new Free shipping badge opens with Active on, "Always free" selected and "Also give real free shipping at checkout" switched on, so its first Save creates a live Shopify free-shipping discount with no minimum: every order ships free from that moment. Set your threshold, or switch Active off, before you save.
On the Free plan, a badge that uses a Pro feature (targeting, a schedule, an animation, an A/B test, or the Reviews rating and Image / Sticker types) cannot be saved as Active. Save is refused with a message that ends "Save it as a draft, or upgrade to Pro." Nothing is saved yet: turn Active off and click Save again to keep it as a draft. A schedule is Pro on every badge type except Countdown, where only a start date is Pro.
Step 4: add the Product Badges block (needed for Low stock)
- Go to Online Store → Themes → Edit theme and choose the product template from the page menu at the top.
- Click Add block in the product information section and, under Apps, pick Product Badges.
- Click Save.
The block reads your badge settings itself and works without the app embed, which is needed only for badges over images and cards. It shows every matching badge except Reviews rating; Low stock shows only here.
Other types do not need it, and with the block added they show twice on the product page: the embed still draws Trust, Sale, Free shipping and Countdown badges over the main image, and the block repeats them. No setting sends a badge to one place only, so add the block if you use Low stock or want that second row, then look at a product page.

Where the app's badges show
The embed draws badges over product images on collection pages, search results, the home page and related products, and on the product page's main image. The app embed keeps badges off the cart page on every theme and skips cart drawers built like Dawn's; drawers on other themes are untested, so open yours to check. Badges never show at checkout. Put the Product Badges block on the product page only: it shows your All products badges wherever you place it, a cart section included.
Compare the three ways
| Theme settings | Custom Liquid | App embed and blocks | |
|---|---|---|---|
| Badge types | Sale and Sold out | Any you code | The app's seven types |
| Shows on cards | Yes | Only if you also edit the card code | Yes, through the embed |
| After a theme update or switch | Settings may be named differently | A block is kept; a file edit can be left out; a new theme has neither | The embed works with any theme version; turn it on in the new theme |
| Skills needed | None | Liquid and CSS | None |
| Cost | Included with your theme | Your time | Free plan; Pro for targeting, schedules (on a Countdown, only a start date) and images |

Shopify's Help Center says "App embeds can be used with any theme version" while "App blocks can only be used with compatible themes" (Shopify Help Center: apps in your theme). So on an older theme, the embed's badges on images still work, but the Product Badges block, and with it the Low stock badge, may have nowhere to go.
Check your badge like a shopper
Open the storefront in a private window and walk through this list:
| Check | Why |
|---|---|
| Product page, desktop and mobile | A badge can cover part of the image on a small screen |
| Collection page and search results | Cards are separate code from the product page |
| Change the variant | A percentage or a stock count can belong to one variant only |
| A product that should not show it | Catches a targeting mistake |
| Logged out, private window | Rules out cached pages and the theme preview |
If an app badge does not show, the app's help lists five checks: the embed is on, the badge is Active, the product matches its targeting, the badge is inside its schedule, and a hard refresh has cleared any cached page. A schedule needs nothing saved at the start or the end: a badge with a start date appears when that time arrives and a badge with an end date disappears when its end arrives, decided in the shopper's browser from the clock, on the Product Badges block, the main product image and the collection and search cards, even on a page that is already open. Dates and times are read in your store's time zone (Shopify Settings, General), and the Active dates panel names that zone; if you change the store's time zone later, save the badge again. One exception: a Countdown set to Show "Ended" reads exactly "Ended" at zero and stays up until you turn it off.
Frequently asked questions
Can I add a badge to a Shopify product without code?
Yes. Your theme's Sale and Sold out badges need a compare-at price above the price, and tracked inventory with "Continue selling when out of stock" off; an app embed adds other badges with a switch in the theme editor, without editing theme files.
How do I add a custom badge to one product only?
With code, wrap your badge in a Liquid condition, for example on the product's tags. With the app, set "Show on" to Specific products; targeting is part of Pro.
Why does my custom badge disappear after a theme update?
On an update, Shopify copies theme editor changes such as a Custom Liquid block, but leaves out a code edit that clashes with the update, and a new theme has none of it. An app embed is part of the app, not of your theme files: Shopify keeps its setting on an update, and you switch it on again in a new theme.
Why is my badge not showing on Shopify?
For a theme badge, check that the compare-at price is above the price, or that inventory is tracked with Continue selling off. For an app badge, check that the app embed is on and saved, the badge is Active and its targeting matches the product; a Low stock badge also needs the Product Badges block, and a badge with a schedule shows only between its start and its end, read in your store's time zone (a Countdown set to Show "Ended" stays up after its end).
How do I remove a badge?
For a theme badge, end the sale or change the code. For an app badge, turn its Active switch off in the Badges list (or in the editor, then save), or delete it, which removes it permanently.
Can I add Shopify product badges for free?
Yes. Theme badges come with your theme, and the app's Free plan includes Trust, Sale, Low stock, Free shipping and Countdown badges on all products; Trust, Sale, Free shipping and Countdown also show on collection and search cards, and Low stock shows in the Product Badges block on the product page. Targeting, schedules (on a Countdown, only a start date), image badges and animations are part of Pro.
Try it
Turn on the embed, create a badge, check it is Active: that is all it takes to add badges to Shopify products with the app.