Shopify Liquid Template Tester

Write Liquid for themes, sections and snippets in file tabs, render them against editable Shopify-shaped objects (product, collection, cart, customer, shop, settings), and see the HTML and a safe preview as you type. Shopify filters such as money, img_url, handleize and t are included, and form, paginate, section and schema tags work.

Runs in your browser. Your files never leave your device. See how to check

…

How to do it

  1. 1
    Load the engine

    Press Load liquidjs to download the 36 KB engine once; the product example renders immediately.

  2. 2
    Write the template

    Edit the main file and add tabs for snippets or sections, marking the rendered one with Make main.

  3. 3
    Set the data

    Edit the Shopify sample objects or paste your own JSON, and set money format and currency.

  4. 4
    Read the output

    Check the HTML output, the sandboxed preview and any error with its file and line.

  5. 5
    Check strictness

    Switch on errors for undefined variables and unknown filters to catch typos.

  6. 6
    Save

    Copy or download the HTML, print template and output, or save the whole project as JSON.

About this tool

Liquid is the template language of Shopify themes, and it also powers Jekyll sites, many email builders and help-desk macros. Changing a theme file normally means pushing it to a development store and reloading a page, which is slow when you only want to check a loop, a price calculation or a filter chain. This tester renders Liquid in the browser. Templates live in file tabs, so a product template can render a snippet with render 'price-badge' or show a section, just as the theme folder would. The data comes from a JSON editor prefilled with objects shaped like Shopify's: a product with variants, options, images, tags and metafields, a collection with products, a cart with line items, a customer, the shop with its money format and theme settings. Change any value and the HTML output updates; the Preview tab shows the result in a sandboxed frame with scripts switched off. Rendering uses liquidjs 10.21.1, an open-source JavaScript implementation of the Liquid language, which covers objects, operators, if, unless, elsif, case, for with limit, offset, reversed, ranges and forloop, cycle, tablerow, assign, capture, increment, decrement, raw, comment, liquid, echo and the standard filters. The tester adds the Shopify filters theme authors reach for most, money, money_with_currency, money_without_trailing_zeros and money_without_currency driven by your money_format, img_url and image_url with sizes, asset_url, handleize, pluralize, t with a locale file you can edit, link_to, weight_with_unit, default_pagination, highlight and color_to_rgb, and Shopify tags: form for common form types, paginate with a paginate object, section, schema, style, stylesheet and javascript. Schema blocks are collected and checked as JSON in their own tab.

What matches Shopify and what does not

Liquid syntax, standard filters and control flow follow the language as Shopify documents it, so loops, conditions, whitespace control with hyphens and filter chains behave as on a store. Store data does not exist here: image and asset filters produce Shopify-style CDN URLs so you can check markup, but the images are not real; paginate shows the first page only; content_for_header, app blocks, JSON templates and sections everywhere settings, localization forms, routes and metafield type objects are not simulated. Filters that are not built in raise an error when Error on unknown filters is on, which helps find typos.

Tested against

The product, collection, cart and section examples were rendered with liquidjs 10.21.1 during development, and the added Shopify filters have unit tests written from the Shopify Liquid reference. Nothing was compared with output from a live Shopify store, so filters such as image_url, t and money may format some values differently there.

Strict checks

Error on undefined variables stops at the first object that is missing from your JSON, with its line, which catches misspelt names such as product.titel. Without it, undefined values render as empty text as on Shopify.

Engine download

liquidjs is about 36 KB and loads from jsDelivr pinned to version 10.21.1 only when you press Load. Templates and data stay on your device.

Limits

Use the tester for logic and markup, then confirm the final theme on a development store with Shopify's theme preview, because the platform adds objects, filters and behaviour that cannot be reproduced offline. It is not an official Shopify tool.

Worked example

A theme developer adds a sale badge to a product card. The sample product costs 4500 cents with a compare_at_price of 6000. The template prints $45.00 and $60.00 with the money filter, then computes the saving with minus, times and divided_by: (6000 − 4500) × 100 / 6000 gives Save 25%. The variant loop lists S / White at $45.00 and M / Sand at $52.00 with Sold out from the locale file, the tags join as linen, summer, new, and the price-badge snippet renders From $45 with money_without_trailing_zeros. Switching money_format to the amount_with_comma_separator placeholder followed by a euro sign changes every price to 45,00 € at once.

Quick facts

Frequently asked questions

Does it run the real Shopify Liquid?

It uses liquidjs 10.21.1, an MIT-licensed JavaScript implementation of the Liquid language, plus Shopify filters and tags written for this tester. Language behaviour matches; store-specific objects and some Shopify-only features are simulated or missing, as listed on this page.

Can I use snippets and render?

Yes. Add a file tab named after the snippet, for example price-badge.liquid, and render 'price-badge' or include finds it. Parameters passed with render work as on Shopify.

How do I test with my own product data?

Open the Objects tab and replace the JSON with your own, for example a product exported from the Admin API. Prices should be in cents, as Shopify stores them, so the money filters format them correctly.

Why does my money filter show the wrong currency?

The money filters follow the shop money_format and currency code fields above the editor. Set them to your store's format, for example a pound sign before the amount placeholder, or the comma separator placeholder followed by a euro sign.

Is the preview safe?

The preview runs in a sandboxed frame with scripts, forms and navigation blocked, so pasted theme code cannot run JavaScript or leave the page.

Can I check my section schema?

Yes. Every schema block in the rendered files is collected in the Schema tab, parsed as JSON and shown formatted, with an error if the JSON is invalid.

Guides for this tool

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