---
title: LiquidSyntaxError
description: Reports Liquid syntax errors.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-syntax-error
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-syntax-error.md
api_name: liquid
---

# Liquid​Syntax​Error

Identifies invalid Liquid syntax in tags, raw tags, branches, variable output, and parser errors. This check reports unknown tags, misplaced branch keywords, invalid raw tag markup, unclosed raw tags, and other Liquid syntax errors.

Fix syntax errors so Theme Check and Shopify can parse the file consistently.

**Note:**

This check covers Liquid tag and output syntax. For HTML markup errors, see [`LiquidHTMLSyntaxError`](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-html-syntax-error).

***

## Examples

The following examples contain code snippets that either fail or pass this check.

### ✗ Fail

In the following example, the `{% liquid %}` tag contains an unknown tag named `hello`:

```liquid
{% liquid
  hello world
%}
```

### ✓ Pass

In the following example, the branch keywords are used inside tags that support them:

```liquid
{% if product.available %}
  Available
{% else %}
  Unavailable
{% endif %}


{% case product.type %}
  {% when 'Snowboard' %}
    Snowboard
  {% else %}
    Product
{% endcase %}
```

***

## Options

The following example contains the default configuration for this check:

```yaml
LiquidSyntaxError:
  enabled: true
  severity: error
```

| Parameter | Description |
| - | - |
| `enabled` | Whether this check is enabled. |
| `severity` | The [severity](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration#check-severity) of the check. |

***

## Disabling this check

Disabling this check isn't recommended.

***
