How to Add a Gift Message to Shopify Order Emails Without an App
Gift messages are one of the cheapest ways to make a Shopify order feel personal—and you don't need a paid app to collect them or print them in your order emails. Shopify's built-in cart notes field and order notification templates can do the whole job with a few lines of Liquid. This guide walks through the full setup, from adding the message field to testing the email before a real customer sees it.
Why Add a Gift Message to Order Emails (Without an App)
Most gift message apps charge a monthly fee and inject a script into your theme. For a small store, that's overhead you can skip. Shopify already lets customers leave a note at checkout, and order notification templates can pull that note into the confirmation email automatically.
Doing it yourself has three practical advantages:
- No recurring cost. You avoid another subscription on top of your Shopify plan.
- No theme bloat. App scripts can slow down checkout and theme updates.
- Full control over formatting. You decide exactly how the gift message looks in the email—font, spacing, and placement.
The tradeoff is that you're editing Liquid, Shopify's templating language. The steps below keep the code minimal so you don't need to be a developer.
What You Need Before You Start
Before touching any code, confirm you have the following:
- A Shopify plan that allows checkout editing. Cart notes are available on all plans, but if you want a dedicated gift message field (separate from general order notes), you'll need access to checkout settings, which vary by plan—check your current plan features in Shopify admin under Settings > Plan.
- Admin access to Notifications. Go to Settings > Notifications in your Shopify admin. You need permission to edit email templates.
- A test order or Shopify's "Preview" and "Send test email" tools. You'll use these in Step 5.
- A backup of your current template. Before editing, copy the existing template text into a plain text file. If something breaks, you can paste it back.
One clarification on terminology: Shopify's default "note" field on the cart page is a general order note. Customers can type anything there—delivery instructions, gift messages, or nothing. If you want a dedicated gift message field, you'll need to either rename the note field or use checkout UI extensions (available on Shopify Plus and some plans). For most small stores, repurposing the cart note is the simplest path, and that's what this guide covers.
Step 1: Add a Gift Message Field to Your Cart or Checkout Notes
Shopify's cart note field is enabled by default in most themes, but you should verify it's visible and labeled clearly.
- In your Shopify admin, go to Online Store > Themes > Customize.
- Open the Cart template (or the cart drawer, depending on your theme).
- Look for the cart note block. In Dawn and most modern themes, it's a block called Cart note that you can enable under the cart section settings.
- Change the label text to something explicit, like "Gift message (optional)". In Dawn, you can edit this in the theme language settings under Online Store > Themes > Edit default theme content, searching for "Note".
- Save.
If your theme doesn't include a cart note block, you can add one manually by editing sections/main-cart-footer.liquid (or your theme's equivalent) and inserting a textarea bound to the cart.note object:
<label for="CartNote">Gift message (optional)</label>
<textarea name="note" id="CartNote">{{ cart.note }}</textarea>
The name="note" attribute is what tells Shopify to save the input as the order note. Don't change it.
Step 2: Find the Right Order Notification Template in Shopify
Go to Settings > Notifications in your admin. You'll see a list of customer and staff notifications. The one you want is Order confirmation, which is sent to the customer immediately after purchase.
A few notes on which template to edit:
- Order confirmation is the primary email most customers open. Start here.
- Shipping confirmation is a good second place if you want the gift message repeated when the order ships.
- New order notifications go to you or your staff, not the customer—skip those unless you want the gift message in your internal alerts.
Click Order confirmation to open the editor. You'll see an HTML email template with Liquid tags. Click the <> code view toggle if you're in the visual editor, since you'll be pasting Liquid directly.
Step 3: Insert the Liquid Snippet Into Your Order Confirmation Email
Find a logical spot in the template—typically after the order summary table and before the shipping address block. Paste this snippet:
{% if note != blank %}
<div style="margin: 24px 0; padding: 16px; border-left: 4px solid #c9a227; background-color: #faf7ef;">
<p style="margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #7a6a3a;">Gift message</p>
<p style="margin: 0; font-size: 16px; line-height: 1.5; color: #333;">{{ note }}</p>
</div>
{% endif %}
How this works:
{% if note != blank %}checks whether the customer actually typed something. If they left it empty, the whole block disappears—no awkward empty box in the email.{{ note }}outputs the text the customer entered.- The inline styles create a bordered callout box so the message reads as a distinct element, not body copy.
If you want the message to appear in the shipping confirmation too, repeat the same snippet in that template. The note variable is available in all order-related notifications.
Step 4: Style the Gift Message So It Stands Out
Email clients are notoriously inconsistent with CSS. Inline styles (as in the snippet above) are the safest approach. A few rules that keep the message readable across Gmail, Apple Mail, and Outlook:
- Use a left border or background tint rather than a full border, which can collapse in Outlook.
- Keep line-height at 1.5 or higher so multi-line messages don't look cramped.
- Avoid web fonts. Stick to system font stacks like
-apple-system, Helvetica, Arial, sans-serif. - Don't use
white-space: pre-lineunless you've tested it—support varies. If customers write multi-line messages and you need line breaks preserved, use{{ note | newline_to_br }}instead of{{ note }}.
A quick comparison of output options:
| Liquid tag | What it does | When to use |
|---|---|---|
{{ note }} |
Outputs the note as-is | Single-line gift messages |
{{ note | newline_to_br }} |
Converts line breaks to <br> tags |
Multi-line messages |
{{ note | escape }} |
Escapes HTML characters | If you're worried about customers pasting HTML |
{{ note | strip_html }} |
Removes any HTML tags | Safest for user-generated content |
For most stores, {{ note | escape | newline_to_br }} is the best default—it strips the risk of injected HTML while preserving line breaks.
Step 5: Test Your Gift Message Email Before Going Live
Don't rely on the preview alone. Run through these checks:
- Place a test order with a gift message in the cart note field. Use a real checkout, then cancel and refund the order afterward.
- Open the confirmation email on both desktop and mobile. Check that the gift message box renders correctly and the text is legible.
- Place a second test order with an empty note. Confirm the gift message block doesn't appear at all.
- Test with a long message (200+ characters) to make sure the box expands without breaking the layout.
- Use Shopify's "Send test email" button in the notification editor to preview with sample data before sending a real order.
If you want to preview with a specific note value, Shopify's test email uses placeholder data. For accurate testing, a real test order is the most reliable method.
Common Liquid Mistakes and How to Fix Them
- Empty box appears when there's no note. You forgot the
{% if note != blank %}wrapper. Add it around the entire block. - Line breaks disappear. Use
newline_to_bras a filter:{{ note | newline_to_br }}. - The note shows raw HTML or breaks the layout. A customer pasted HTML. Add
escapeorstrip_htmlto the output. - The message doesn't appear at all. Confirm you edited the Order confirmation template, not a different notification. Also check that the cart note field is actually saving—place a test order and view the order in admin to see if the note is there.
- The message appears in the wrong place. You may have pasted the snippet inside a
{% for %}loop over line items. Move it outside the loop, typically after the order summary table closes.
Conclusion
Adding a gift message to Shopify order emails without an app takes about 15 minutes of setup and zero ongoing cost. The cart note field handles collection, and a short Liquid snippet with an {% if %} check handles display. Test with real orders before going live, and keep a backup of your template so you can revert if needed.
FAQ
Can I use a separate field just for gift messages instead of the general cart note? On standard Shopify plans, the cart note is the simplest option. A dedicated gift message field requires checkout UI extensions, which are available on Shopify Plus and select plans—check your plan's checkout customization features.
Will the gift message appear on the packing slip too?
Yes, if you add the same {{ note }} snippet to the packing slip template under Settings > Notifications. The note variable is available there as well.
What happens if a customer writes something inappropriate in the note field?
The note is customer-generated content and will appear in their own confirmation email. It's not displayed publicly. If you're concerned about HTML injection, use the escape or strip_html filter as shown in Step 4.