tutorialsflipbooksmall businessonline tools

Squarespace Code Block: How to Put a Flipbook on Any Page

Step-by-step tutorial for placing a page-turning flipbook on any Squarespace page using a Code Block. Covers plan requirements, embed code, responsive sizing, password protection, mobile testing, and fixes for the most common display problems.

Squarespace Code Block: How to Put a Flipbook on Any Page
Cristian Da Conceicao
Founder of Flipbooks AI

You have a catalog, a menu, or a portfolio sitting in a PDF, and your Squarespace site shows it as a plain download link that nobody clicks. A flipbook fixes that. Visitors read right on the page, turn pages with a swipe, and never leave your site. The tool that makes it work is the Squarespace Code Block, and with a flipbook built in Flipbooks AI, the whole job takes about ten minutes.

This tutorial walks through every step: what you need, where the code goes, how to size it, and how to fix the problems that trip people up.

What a Code Block Actually Does

A Code Block is a content block that accepts raw HTML. Instead of typing text or dropping in an image, you paste a snippet, and Squarespace renders it exactly as written. An embed code from a flipbook platform is one of those snippets. It tells the browser to load your flipbook inside a frame on your page.

Person adding a block on a laptop at a cafe table

Why Not Just Link the PDF?

A linked PDF opens in a new tab or downloads to the device. On a phone, that often means pinch-zooming a tiny page. An embedded flipbook stays inside your layout, scales to the screen, and keeps people on your site longer.

MethodReading experienceStays on your siteMobile friendly
PDF download linkOpens separate fileNoPoor
Image gallery of pagesManual scrollingYesAverage
Embedded flipbookPage-turning viewYesExcellent

Which Squarespace Plan Do You Need?

Code Blocks are available on the Business plan and above. Personal plans cannot run custom code. Check this before you build anything, because it is the number one reason the block seems to be missing.

⚠️ If you only see the Markdown block and no Code option, your plan likely does not include custom code. Upgrade under Settings, then Billing.

What to Prepare Before You Start

Gather three things first. This saves backtracking later.

  • A finished PDF. Compress oversized files so pages load fast.
  • A Flipbooks AI account. Free to open, and your embeds carry no watermark.
  • The Squarespace page where the flipbook should live, already created in the Pages panel.

Desk with laptop showing embed code and a printed brochure

Prepare the PDF

Export at a sensible resolution. For most catalogs, a file between 5 and 25 MB looks sharp and loads quickly. Keep pages in a consistent size, because mixed page sizes make the flip animation look uneven.

Pick Your Layout Spot

Decide whether the flipbook takes the full width of the page or sits beside text. Full width suits catalogs and magazines. A half-width placement works for a sample preview next to a sign-up form.

Build the Flipbook First

The embed code does not exist until the flipbook does. The process is short.

  1. Open Flipbooks AI and sign in.
  2. Click the upload button and choose your PDF. The PDF to Flipbook Converter turns each page into a flippable spread.
  3. Set your branding: background color, logo, and toolbar buttons.
  4. Choose page effects such as the turning animation speed and sound.
  5. Save, then open the share panel.

💡 Match the flipbook background color to your Squarespace section color. The frame then disappears and the flipbook looks native to the page.

Customize Before You Embed

Changes you make after embedding update automatically, so you can fix typos later. Still, set the basics now: logo, color, and the starting page. If your PDF has links or videos, the platform keeps them active, and you can also add audio and video inside pages.

Photographer holding a large printed portfolio in a studio

Copy and Paste the Embed Code

This is the heart of the process. Follow it in order.

In Flipbooks AI

  1. Open your flipbook and click Share.
  2. Select the Embed tab.
  3. Choose a width. Set it to 100% for a responsive layout.
  4. Copy the generated code. It looks like an iframe tag with your flipbook link inside.

The Embed Flipbook on Website tool explains the options if you want to see them before choosing.

In Squarespace

  1. Go to Pages and open the page you prepared.
  2. Click Edit, then hover over the section and click Add Block.
  3. Choose Code from the block list.
  4. Paste the embed code into the box.
  5. Switch off Display Source so the flipbook renders instead of showing raw text.
  6. Click Apply, then Save.

✅ Best practice: leave Display Source off. If it stays on, visitors see the raw code instead of your flipbook.

Here is a quick troubleshooting view of what each setting does.

SettingWhat it doesRecommended value
Display SourceShows code as textOff
Block widthSets how wide the frame is100%
Block heightSets how tall the frame is600 to 800 px desktop
Section backgroundColors the area around the frameMatch flipbook color

Standing desk with a large monitor showing a web page layout

Size It So It Looks Right

A frame that is too short crops the pages. One that is too tall leaves a gap. Both look careless.

Fix the Height

Squarespace does not auto-resize iframes. Set a fixed height in the embed code, such as height="700". A good rule is to take the width of your content area and multiply by 0.65 for a spread view.

Make It Responsive

Wrap the iframe in a container with a percentage width, so it shrinks on phones. Many people also add a taller height for mobile using a short style block in Custom CSS.

  • Desktop: 700 px height works for most spreads.
  • Tablet: 600 px keeps the toolbar visible.
  • Phone: 500 px with single-page view reads best.

💡 Open your page on a real phone, not only the browser's preview mode. Real devices reveal toolbar overlap that the preview misses.

Three Layout Examples

Use casePlacementSuggested height
Product catalogFull-width section750 px
Restaurant menuCentered, 80% width650 px
Photography portfolioFull-bleed section800 px

Real Examples That Work

Seeing real use cases makes the decision easier.

A restaurant can embed a seasonal menu built with the Restaurant Menu Creator. When the menu changes, they edit the flipbook once and the Squarespace page updates itself, with no new code.

Restaurant owner reviewing a menu on a tablet

A real estate agent can place a property brochure from the Real Estate Brochure Creator on each listing page. Buyers flip through floor plans and photos without a download.

Real estate agent showing a tablet to a couple

A photographer can build a gallery with the Photography Portfolio tool, then drop it into a portfolio page. A boutique can use the Product Catalog maker for a wholesale lookbook.

Control Who Sees It

Not every flipbook should be public. Wholesale price lists, client proposals, and internal manuals need protection.

Password Protection

In Flipbooks AI, turn on password protection in the share settings. Visitors enter the password before the pages load. Pair this with a Squarespace member area or a hidden page for extra privacy.

Lead Capture and Analytics

On the Professional plan you can collect emails before readers open the flipbook, and see which pages get the most attention. Review the pricing plans to compare what each tier includes.

FeatureStandardProfessional
Unlimited flipbooksYesYes
No watermarkYesYes
Password protectionYesYes
AnalyticsBasicDetailed
Lead generationNoYes
Offline downloadYesYes

Hand swiping a digital publication on a smartphone

Fix the Most Common Problems

Even a simple embed can misbehave. These are the usual suspects.

The Block Shows Raw Code

Display Source is switched on. Open the block, turn it off, and save.

The Flipbook Is Blank

Check that you copied the entire snippet, including the closing tag. A partial paste produces an empty frame. Also confirm the flipbook is published and not set to private without a password.

It Looks Cut Off on Mobile

Increase the height value, or reduce the number of toolbar buttons in your flipbook settings. Fewer buttons leave more room for the page itself.

It Does Not Show in the Editor

Squarespace sometimes hides embeds while editing. Preview the page or visit the live URL. The flipbook loads there.

Seven Checks Before You Publish

  1. Display Source is off.
  2. Width is 100% or matches the section.
  3. Height fits the pages with no crop.
  4. Background color matches the section.
  5. Tested on a phone and a tablet.
  6. Password set if the content is private.
  7. Page title and description written for search.

Two colleagues reviewing a checklist at a shared table

Help Search Engines Find the Page

An embedded frame is not read the same way as page text, so surround it with real words. Add a heading above the flipbook, two or three sentences describing the content, and a text link to the PDF for readers who prefer it.

  • Write a descriptive H1 for the page.
  • Add a short summary paragraph above the embed.
  • Name images with plain words.
  • Link to related pages on your own site.

💡 A flipbook without surrounding text gives search engines little to index. A short intro paragraph solves that in under a minute.

Keep the Flipbook Fresh

The best part of this setup is maintenance. Because the Code Block loads your flipbook from a live link, you never touch Squarespace again when content changes. Replace the PDF in Flipbooks AI, and the page reflects it at once. Seasonal menus, quarterly catalogs, and updated price lists all stay current with one upload.

Boutique owner closing up with a laptop glowing on the counter

Your Next Step

Ready to put your first flipbook on your site? Create a free account on Flipbooks AI, upload your PDF, and paste the embed code into a Squarespace Code Block. Browse the full list of flipbook tools to find the right template for your content, and compare pricing plans when you are ready for analytics and lead capture.

Share this article