Developer and Text Tools

How to Test Shopify Liquid Code Without Pushing to Your Store

Try Liquid loops, filters and snippets against sample product, collection and cart data, see the HTML instantly and catch typos before they reach a theme.

Saizul Amin
Saizul Amin19 Nov 2026 · 4 min read
How to Test Shopify Liquid Code Without Pushing to Your Store

How to Test Shopify Liquid Code Without Pushing to Your Store

Shopify themes are written in Liquid, and most theme work is small: a sale badge, a different price format, a loop that skips sold-out variants, a section with a few settings. Each change normally means saving to a development theme, waiting for the sync and reloading a product page. The free Shopify Liquid Template Tester lets you try the logic in a scratch pad first, with data shaped like a real store.

What runs behind the page

The tester uses liquidjs 10.21.1, an MIT-licensed JavaScript implementation of the Liquid language, loaded once from a CDN when you press the load button (about 36 KB). It handles the core language exactly as Shopify documents it: output tags, filters and their chains, if and unless with elsif and else, case and when, for loops with limit, offset, reversed and ranges, the forloop object, cycle, tablerow, assign, capture, increment and decrement, comment and raw, the liquid and echo tags, and render with parameters.

Shopify adds its own filters and tags to the language. The tester includes the ones theme developers use most: the money family driven by your store's money format, img_url and image_url with sizes, asset_url, handleize, pluralize, t for translations, link_to, weight_with_unit, default_pagination, highlight and color_to_rgb, plus the form, paginate, section, schema, style, stylesheet and javascript tags.

Step 1: write the template in tabs

The main template sits in the first tab. Add tabs for snippets and sections with the names you use in render and section tags, for example price-badge.liquid, and they are found just as in a theme's snippets folder. Mark the file to render with the star.

Step 2: edit the store data

The Objects tab holds JSON for product, collection, cart, customer, shop, settings and request, filled with a believable sample: a linen shirt with two variants, three products in a summer collection, two items in the cart. Prices are in cents, as Shopify stores them, so 4500 means $45.00 once the money filter runs. Replace any part with your own data, for example a product exported through the Admin API, and the output follows.

Set the money format and currency above the editor. Switching from ${{amount}} to {{amount_with_comma_separator}} € changes every price in the page at once, which is a quick way to check a theme for a European store.

Step 3: read the output and the preview

The HTML output updates as you type. The Preview tab renders it in a sandboxed frame with scripts, forms and navigation blocked, so you can see the layout without any risk from pasted code. Image URLs point to Shopify-style CDN paths so you can inspect the markup; the pictures themselves are placeholders.

Step 4: let the strict checks find typos

Two switches make Liquid less forgiving than a live store, which is what you want while writing. Error on unknown filters stops at a misspelt filter such as monney with its line. Error on undefined variables stops at the first object that is missing from your data, catching product.titel before a customer sees an empty heading.

A worked example: a sale badge

A product card should show the compare-at price and the saving. The template prints product.price | money and product.compare_at_price | money, then calculates the percentage with compare_at_price | minus: product.price | times: 100 | divided_by: product.compare_at_price. With the sample shirt at 4500 and 6000 cents, the output reads $45.00, a struck-through $60.00 and Save 25%. A loop over variants prints each title and price and adds the translated Sold out text from the locale file when available is false. A render 'price-badge' line passes the price into a snippet that uses money_without_trailing_zeros to print From $45.

Because divided_by on two integers rounds down in Liquid, a saving of 24.9 percent shows as 24. Seeing that in the tester before launch is exactly the point.

Sections and schema

When a section file contains a schema block, the tester collects it, parses the JSON and shows it formatted in the Schema tab, with an error if a comma is missing. Add a section object with settings and blocks to the data to see how the section renders with your defaults.

What it does not simulate

Real store data, content_for_header, app blocks, JSON templates and sections everywhere, routes, localization forms and the full set of metafield types are not available offline. The paginate tag renders the first page only. Use the tester for logic and markup, then confirm the final change on a development store with Shopify's preview.

Keep the work

Save the project with its tabs, data and settings, export it as JSON, download the rendered HTML, or print the template with its output for a code review.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages