Shopify Liquid Tags Visible in Rendered HTML
Search intent: diagnose · Updated February 2026
Raw Liquid template tags - such as {{ product.title }} or {% for variant in product.variants %} - appearing in your Shopify store's visible HTML means Shopify's template engine failed to process those tags before serving the page. This happens when Liquid code is placed in a context where it isn't executed: inside a .js file, within a <script> block incorrectly, in a template with the wrong object context, or in a snippet that was included without proper variable scope. The fix requires locating the unprocessed Liquid in your theme code and correcting the rendering context.
Not sure if your store has this issue?
Run a free scan to detect shopify-specific problems instantly.
What This Issue Means
When Google crawls your store - or when a customer visits - they see the raw template code ({{ product.title }}) displayed as literal text instead of your actual product name. This is a template rendering failure: the equivalent of a website accidentally showing its database queries. The practical consequences range from ugly visible code that destroys user trust, to critical content (product descriptions, prices) being completely absent from the rendered page because unprocessed Liquid is substituted for the actual content.
What Causes It (Shopify-Specific)
Liquid code placed inside a .js file
Shopify only processes Liquid templating in .liquid files. If Liquid syntax is placed in a .js file (e.g. theme.js, custom.js), it is served as literal text - {{ product.title }} is served as the string "{{ product.title }}" to the browser.
Using a Liquid object outside its template context
Each Shopify template type has access to specific objects. Using {{ product.title }} in a page template (pages/) or a blog template fails because the product object doesn't exist in that context - the variable outputs nothing or is rendered as its literal Liquid syntax.
Using {% include %} instead of {% render %} for snippets
{% include %} (deprecated) shares the parent template's variable scope, which can cause snippets to access variables that don't exist in certain contexts. {% render %} (modern) uses an isolated scope and requires explicit variable passing, preventing implicit context failures.
App-installed code with incorrect Liquid syntax
Some Shopify apps inject code into theme files during installation. If the app's injected code contains malformed Liquid, uses deprecated syntax, or references objects unavailable in the target template, the raw Liquid appears in the output.
Liquid code inside {% schema %} JSON blocks
{% schema %} and {% endschema %} blocks contain static JSON for section settings - Shopify does not process Liquid inside them. Developers who accidentally add Liquid syntax inside a schema block will see it rendered as literal text in the section's JavaScript configuration.
Copy-pasted code from wrong template type
Code snippets copied from product templates and pasted into collection or page templates without adjusting object references will reference product when product doesn't exist, causing rendering failures for those variables.
How to Detect It Manually
- 1View Source on your store (Ctrl+U / Cmd+U) → press Ctrl+F → search for {{ or {%
- 2Any result found outside of <script type="application/json"> or <script type="application/ld+json"> blocks indicates a Liquid rendering failure
- 3Check key pages: homepage, a product page, a collection page, and a blog post - rendering failures often only affect specific template types
- 4In Chrome DevTools → Elements tab → Ctrl+F → search for {{ - this searches the live DOM after JavaScript rendering
- 5Use Google Search Console → URL Inspection → "View Crawled Page" → look at the HTML Google actually received - this is the most accurate view of what Google sees
- 6Run an SEOScan audit - it strips script/style blocks and searches visible content for Liquid tag patterns as a dedicated check
How to Fix It (Step-by-Step)
Identify which template file contains the unprocessed Liquid
In Shopify Admin → Online Store → Themes → Edit code, use the search function (if available in your theme editor) to search across all files for the literal text you saw in the page source. Identify which .liquid file the code belongs to.
Move Liquid code from .js files to .liquid files
If Liquid syntax exists in a .js file, the fix is to move the code into a .liquid file (a snippet or section) where Shopify can process it, then render the .js file's functionality from there.
<!-- WRONG: Liquid in a .js file (won't be processed) -->
var productTitle = {{ product.title }};
<!-- RIGHT: In a .liquid file, output JS variables using | json filter -->
<script>
var productTitle = {{ product.title | json }};
var productPrice = {{ product.price | json }};
</script>Fix wrong template context (product in non-product template)
If code referencing {{ product }} appears in a page or collection template, either remove it or pass the product explicitly. For snippets, use {% render %} with explicit variable passing:
{%- comment -%} Wrong: using product in a non-product context {%- endcomment -%}
{% include 'product-card' %} {%- comment -%} product may not exist here {%- endcomment -%}
{%- comment -%} Right: use render with explicit variable passing {%- endcomment -%}
{% assign featured = collections['frontpage'].products.first %}
{% render 'product-card', product: featured %}Replace {% include %} with {% render %} throughout your theme
{% include %} is deprecated and can cause variable scope leakage. {% render %} uses an isolated scope. Replace all {% include 'snippet' %} with {% render 'snippet' %} and explicitly pass any variables the snippet needs.
{%- comment -%} Deprecated (variable scope bleeds in) {%- endcomment -%}
{% include 'product-card' %}
{%- comment -%} Modern (sandboxed, explicit variable passing) {%- endcomment -%}
{% render 'product-card', product: product, show_vendor: section.settings.show_vendor %}Remove or fix app-injected Liquid code
If an app installation caused the issue, check theme.liquid and other modified files for the app's injected code. If malformed, either remove it and re-install the app, or contact the app developer with a screenshot of the rendering failure.
Test on specific page types where failure occurs
Liquid rendering failures are often conditional - they only appear on specific pages. Test your product pages, collection pages, homepage, and blog posts separately to identify which template types are affected.
How SEOScan Detects This Issue
SEOScan strips all <script> and <style> blocks from the rendered HTML (to avoid false positives from JSON-LD and JavaScript), then searches the visible text content for patterns matching {{ ... }} and {% ... %}. Any matches in the visible content (outside legitimate script blocks) are flagged as critical Liquid rendering failures, with the first 5 examples extracted and displayed. The tool separately checks for double-escaped HTML entities (&amp;, &lt;) which indicate Liquid double-encoding errors in schema or meta tags.
Example Scan Result
Description
Liquid template tags found in rendered HTML outside script blocks: {{ product.metafields.custom.care_instructions }}, {{ section.settings.announcement_text }}. These indicate Liquid template rendering failures - either the wrong template context or code placed in a non-Liquid file.
Impact
Google indexes the raw Liquid syntax as page text content. This appears in search snippets, destroying CTR. The actual content these tags should output (care instructions, announcement text) is absent from the page.
Recommended Fix
Identify which template file contains these Liquid tags and verify the correct rendering context. Check if product is available in the template where the tag appears. Replace any {% include %} usage with {% render %} with explicit variable passing.
Code
{%- comment -%} Wrong: referencing product in a non-product context {%- endcomment -%}
{{ product.metafields.custom.care_instructions }}
{%- comment -%} Right: pass product explicitly via render, or check template availability {%- endcomment -%}
{% if product %}
{{ product.metafields.custom.care_instructions }}
{% endif %}Why It Matters for SEO
Google Indexes Broken Content
Google crawls and indexes what it receives, including raw Liquid tags. Search Console will show "{{ product.title }}" as your page title or meta description. This results in click-through rates near zero for any listing showing code instead of content.
Missing Critical Content
Unprocessed Liquid means the content it should output is absent. A product description showing {{ product.description }} instead of actual copy means Google indexes no product information - devastating for product page rankings.
Trust and Credibility Signal
A store displaying raw template code to customers is perceived as broken or untrustworthy. This causes immediate bounce, particularly on mobile where the broken text is impossible to ignore.
Indicator of Broader Theme Issues
Liquid rendering failures are almost never isolated. When one unprocessed tag is found, there are typically others in adjacent code. This issue is a strong signal that a recent theme edit or app installation introduced structural template problems.
Real-World Validation Signals
- Liquid rendering failures are found in approximately 11% of Shopify stores audited, most commonly introduced after theme customisation or app installation.
- The issue appears most frequently after copying code between templates without adjusting object context - e.g. taking product page code and adding it to the homepage or a collection page.
- {{ }} rendering failures almost always co-occur with other template issues in the same store - treating one symptom without auditing the full theme usually leaves others unfixed.
- Google's crawl of a page with visible Liquid tags results in zero keyword relevance being extracted from the broken sections - effectively making that portion of the page invisible to organic search.
- After fixing Liquid rendering failures, correct content typically appears in Google's cached page within 1–2 weeks following a re-crawl.
Frequently Asked Questions
Q: Can Google still rank my page if it has visible Liquid tags?
Google will index and potentially rank the page, but the raw Liquid text ({{ product.title }}) is treated as your content. This means your product name in Google's index might literally be "{{ product.title }}" - not your actual product name. CTR and relevance are severely impacted.
Q: My store looks fine in preview mode - why are Liquid tags showing?
Shopify's theme editor preview renders Liquid. The issue may only appear in specific conditions: on a particular template type (collection vs product), when a specific variable is null, or in contexts where the Shopify editor simulates data that isn't available in live rendering.
Q: A third-party app caused this - what should I do?
Screenshot the visible Liquid tags, note which page type shows them, then contact the app developer with this evidence. If the developer can't fix it quickly, locate the app's injected code in your theme (usually in theme.liquid or a snippet) and remove it temporarily until the fix is available.
Q: Is {% include %} really deprecated? My theme uses it everywhere.
Yes, {% include %} was deprecated by Shopify in favour of {% render %}. While {% include %} still works, it shares the parent template's variable scope which can cause subtle rendering failures. {% render %} is sandboxed, faster, and is the officially supported approach. Modern OS 2.0 themes use {% render %} exclusively.
Q: How do I search across all my theme files for a specific Liquid variable?
In Shopify's theme code editor, use the search icon (if available) to search across all files. Alternatively, download your theme as a ZIP (Themes → (...) → Download theme file) and search the extracted files with any code editor or grep.
Check Your Store for This Issue
SEOScan automatically detects shopify liquid tags visible in rendered html and 5 related issues - with specific fixes for your store.
Run Free ScanRelated Issues
Shopify /collections/all Duplicate Content Problem
Crawlability & Indexing · High
Render-Blocking Scripts on Shopify: Detection and Fixes
Performance · High
Shopify JSON-LD Parse Error: Finding and Fixing Broken Schema
Structured Data · Critical
Shopify Duplicate Meta Tags Caused by Apps: Detection and Fix
Technical SEO · High
Shopify Deprecated img_url Filter: How to Migrate to image_url
Shopify-Specific · Low