Choose the shape
A circle, rounded square or pill, with an arrow icon and optional label.
Free tool · Squarespace widget
Add a button that appears as visitors scroll and takes them back to the top of the page. Choose the shape, colour and position, then paste one snippet into Code Injection.
Shown next to the icon on the pill shape. Leave empty to use “Top”. Other shapes show the icon only.
What screen readers announce. Leave empty to use “Back to top”. On the pill shape it should contain the visible text.
The ring fills as the visitor scrolls down the page. Pick a colour that stands out against your page background.
0 keeps the button visible all the time.
Animation and smooth scrolling are switched off automatically for visitors who prefer reduced motion. The button is hidden when printing.
A small, visible ‘Widget by …’ link. Thanks for keeping it, you can turn it off.
The label sits just under the button on a small rounded chip, so it stays readable on any page colour.
Scroll the sample page above, then click the button to return to the top. Links are switched off in this preview.
Generating your code…
</body> tag of your page or template.The button appears on every page that includes the code. If you paste it twice, only one button is created. The code makes no network requests and loads no libraries. Test it once on your live site on desktop and mobile after saving.
Runs in your browser. Nothing you enter is uploaded or stored.
A circle, rounded square or pill, with an arrow icon and optional label.
Colours, size, corner, offsets, and how far visitors scroll before it appears.
One small block of code with the styles and script included.
In Squarespace, open Settings, Developer Tools, Code Injection (it may be under Advanced in older versions) and paste it in the Footer box. Check your plan includes it, then view the live site.
Straight answers about this tool. If yours isn't here, ask me directly.
Yes, when it is pasted into Code Injection it loads on every page of the site.
Some templates have their own. If yours does, use one of them, not both.
Yes. It is a real button with a label, so it works with a keyboard and screen readers.
Yes. For visitors who ask their device to reduce motion, it jumps to the top without smooth scrolling.
A small, visible label next to the button that points back to this site. It is on by default and you can switch it off. It is marked nofollow.
The hosting I use
In my experience it's one of the best hosting options for small business websites, and it's the one I suggest. If you sign up through my link, I earn a small commission at no extra cost to you.
These tools are free to use. If your site needs more than a back-to-top button, I design and build custom websites for small businesses, and I offer a free audit that shows you what to fix first.