Shop Buddy

Shopify Liquid errors · Liquid syntax error

Fix a “Liquid syntax error” on your Shopify store

Liquid could not parse the file. A tag was opened and never closed, the wrong closing tag was used, or a quote or bracket is unbalanced. The error usually points at the last line Liquid managed to read, so the real mistake is often a little above it.

Liquid syntax error (sections/main-product line 84): 'if' tag was never closed

Paste your version of the error

The file, line, and name in your error are turned into exact steps.

Decoded in your browser. Nothing is sent anywhere.

How to fix it in Shopify

  1. In Shopify admin open Online Store, then Themes. On the theme that shows the error choose the three-dot menu, then Edit code. If that is your live theme, duplicate it first and fix the copy.
  2. Open the file and go to the line. Look above it for the most recent if, for, unless, case, capture, or comment tag and check that it has its matching closing tag.
  3. Check quotes and brackets inside the tag on that line.
  4. Save. The editor refuses to save while a syntax error remains, so the file is fixed when it saves.

Fix it without touching your live theme

Add Shop Buddy to Claude or ChatGPT and paste the error there. It finds the line in your actual theme, makes the fix on a private copy, shows you before-and-after screenshots, and publishes only when you tap. Roll back with one tap.

Get started

Questions

The line it points to looks fine.
The error is reported where parsing gave up, which is often the end of the file or the next tag. Work upward from that line to the last tag you edited.

Other Shopify Liquid errors