How to Add HTML to Squarespace: Embed Code in Pages, Sections & Headers
Learn how to insert custom HTML into Squarespace sites to enhance functionality — from forms to widgets and scripts.
How to Add HTML to Squarespace: Embed Code in Pages, Sections & Headers
Want to add custom widgets, forms, maps, or third-party tools to your Squarespace website? Adding HTML code is one of the easiest ways to customize your site beyond the default editor.
Here’s how to embed HTML code into pages, sections, and headers in Squarespace.
1. Add HTML Using a Code Block
The easiest way to add HTML is with a Code Block.
To do this:
Open the page you want to edit
Click Edit
Click the “+” button to add a new block
Select Code from the block menu
You can now paste your HTML embed code directly into the block.
This is commonly used for:
Calendars
Forms
Maps
External widgets
Custom embeds
2. Add HTML to a Specific Section
If you want to place custom HTML inside a specific section:
Add a Code Block inside that section
Paste your HTML code
Resize and position the block where needed using Fluid Engine
This gives you more control over layout and placement.
3. Add HTML to the Header
Some tools require code to be added site-wide inside the website header.
To do this:
Go to Settings
Click Developer Tools or Custom Code depending on your Squarespace version
Locate the Header Code Injection area
Paste your HTML code there
This is often used for:
Verification tags
Tracking tools
Chat widgets
Font embeds
4. Save and Preview
After adding your HTML:
Click Save
Preview your site on desktop and mobile
Test the embed or feature to make sure everything works correctly
Some third-party tools may take a few seconds to load.
Final Tip
HTML embeds are a great way to extend the functionality of your Squarespace website without needing advanced development skills.
Before adding code:
Make sure it comes from a trusted source
Avoid adding too many external scripts
Always test your site performance afterward
A few well-placed embeds can add a lot of functionality while keeping your site clean and professional.