An infinite counter is a great way to add dynamic flair to your website. Whether you’re showing off milestones, simulating real-time metrics, or simply drawing attention to a fun or eye-catching number, an animated, continuously increasing counter can add movement and engagement to an otherwise static page.
In this tutorial, we’ll show you how to create an infinite counter using a small snippet of HTML, CSS, and JavaScript — all fully compatible with Squarespace 7.1 (and 7.0).
Table of Contents
Why Use an Infinite Counter?
Adding an infinite counter can help:
Simulate live data (e.g., downloads, clients served, cups of coffee 😄)
Make stats feel active and dynamic
Grab attention without distracting users
Add playful or impressive visual detail
Complexity: Easy
Step-by-Step Instructions
Step 1
On the page you want the infinite counter to be visible, add a code block to insert the html code below.
<div class="main_container" id="id_main_container">
<div class="counter" id="id_counter">
</div>
<p class="view"> Views </p>
</div>
Step 2
On the page menu, click on the page gear icon and select the ‘Advanced’ selection and copy and paste the code below.
<style>
.main_container {
height: auto;
width: auto;
padding: 3px;
margin: 2px;
max-width: 300px;
background-color: #555555;;
align-content: center;
}
.counter {
height: auto;
border: none;
background-color: white;
max-width: 290px;
vertical-align: center;
padding-top: 3px;
padding-left: 10px;
padding-right: 10px;
text-align: center;
}
.view {
height: 16px;
width: auto;
padding-bottom: 10px;
margin: 2px;
background-color: transparent;
text-align: center;
color:#fff;
}
</style>
<!--- infinite counter on Squarespace --->
<!--- Copyright Primitius Consultancy [https://primitusconsultancy.co.uk] --->
<script>
let start = new Date(2022, 0, 7); // date
let rate = 20 / (10 * 1000); // speed rate
let base = 2517773642; // initial base number
setInterval(function () {
let views = Math.floor((new Date() - start) * rate) + base;
let givenNumber = views;
id_counter.innerHTML= givenNumber.toLocaleString('en-US'); // pass views
}, 250); // update every .25 of a second
</script>
<!--- End infinite counter on Squarespace --->
Step 3
Note: Finally you will need to change the start date, rate and base number to values suitable for your counter rate.
let rate = 20 / (10 * 1000); // speed rate
let base = 2517773642; // initial base number
Views
Key Takeaways
Infinite counters add life to your site and draw attention to numeric elements.
They can simulate real-time stats, giving your brand a sense of momentum.
The counter can be customized with CSS and controlled via JavaScript.
Use responsibly to avoid over-animation or distracting your visitors.
FAQs
Will this affect my site speed?
No — it’s a lightweight script and runs efficiently in the background.
Can I make the counter count down or stop at a specific number?
Yes, but then it wouldn’t be infinite! 😉 You can modify the script to include limits or countdowns if needed.
Can I show multiple counters on the same page?
Yes, you can duplicate the structure with different ids and duplicate the JavaScript functions accordingly.
Conclusion
Creating an infinite counter in Squarespace is a simple yet powerful way to add motion and data-driven appeal to your website. Whether you're faking it for flair or simulating impressive growth, it’s a clever design element that takes just minutes to implement.
See other related blogs
If you have any questions or need any help with your Squarespace website design, you can book a 1:1 consultation.
Artificial intelligence has changed the way websites can be designed. Today, AI can generate website layouts, write content, create images, suggest colour palettes and even produce HTML, CSS and JavaScript.
AI has made it possible to create impressive website designs and working website code without having to be an experienced web developer.
Squarespace has recently improved its Product Pages, giving website owners and designers much more flexibility when creating online stores.
Learn how to create collapsible form sections in Squarespace 7.1 using CSS and JavaScript to organise long forms and improve the user experience.
By default, folder titles in Squarespace 7.1 are not clickable. Instead, they simply expand to reveal the pages inside the folder.
The Squarespace 7.1 Accordion block is a great way to organise content such as FAQs, services, features, and product information.
If you're using categories on your Squarespace 7.1 Shop page, you've probably noticed that the first filter tab is always labelled "All."
If you regularly share CSS, JavaScript, HTML, or code snippets on your Squarespace website, you've probably noticed the Monospace text option in the text editor.
Squarespace 7.1 Auto Layouts (List Sections) are great for structured content, but they quickly run into a common limitation: long descriptions make layouts feel crowded and harder to scan.
If you're publishing on Substack and running a website on Squarespace, you've probably wished you could display your latest posts directly on your site without copying and pasting them manually every time.
Background videos are a powerful way to create visual impact on your website, especially on hero sections built in Squarespace 7.1.
Not every page on your website needs to be visible to the public or searchable on platforms like Google Search. Whether you're working on a draft page, creating private content, or building a conversion funnel, controlling page visibility is essential when using Squarespace.
Vertical video has become the dominant format across platforms like TikTok, Instagram Reels, and YouTube Shorts. As a result, many website owners now want to display portrait videos on their websites.
Videos are one of the most powerful elements you can add to a website. They grab attention, increase engagement, and help explain your products or services quickly.
In this tutorial, you'll learn how to disable CSS in the edit mode, but kept active on the live site.
In this tutorial, you'll learn how to remove space under code blocksin Squarespace 7.1. If you’re embedding third-party widgets, videos, or custom code in Squarespace 7.1, you might notice an unexpected gap appearing below your code blocks.
Blogging has changed a lot over the past few years. Search engines are smarter, AI summaries appear at the top of results, and users expect faster, clearer answers. With all these changes, many small business owners are asking a fair question. Does blogging on Squarespace still help with SEO?
Artificial intelligence has moved from being a novelty in web design to becoming a practical tool used by developers, designers, and business owners alike. AI is no longer just about chatbots or auto-generated content.
Running a small business means juggling visibility, credibility, and ease of management, often with limited time and budget. Website platforms have continued to evolve, but the core needs of small businesses have not changed much.
Organic traffic has always been a cornerstone of digital growth, but by 2026 its meaning has expanded far beyond simple search engine rankings. In the past, organic traffic mainly referred to website visitors who arrived through unpaid search results.
Growing a service-based business requires more than just offering excellent services it’s about building a strong brand, attracting the right clients, and creating systems that allow your business to scale.
The centered-links header in Squarespace 7.1 is known for one frustrating quirk: even when there appears to be sufficient horizontal space, the navigation links can unexpectedly wrap onto multiple lines and disrupt the layout.
Creating your first digital product can feel like a daunting task, but with the right roadmap, you can go from a simple idea to a fully launched product with confidence.
Pinterest is a powerful visual platform that can drive traffic to your website especially if your business is image-heavy, such as design, fashion, food, or travel.
Summary blocks in Squarespace 7.1 are a powerful tool for showcasing blog posts across different pages. These blocks often include a ‘Read More’ link, encouraging visitors to click through and read the full article.
By default, Squarespace 7.1 applies underlines to links in your site’s header and dropdown menus—especially when hovered or active. While this can help indicate clickable elements, many site owners prefer a cleaner, more modern look without the underline, especially in dropdown menus.
The "Read More" link in Squarespace’s basic blog grid layout often comes with default styling that might not align with your site’s visual identity. With a few simple tweaks using custom CSS, you can transform this link into a branded and interactive element that encourages clicks and improves the overall look of your blog feed.
If you're building a website that needs to reach an international audience—or simply want your content to appear in a different language—changing your language settings on Squarespace is a great way to enhance user experience and increase accessibility.
The "Read More" link in your blog summaries or excerpts on Squarespace can help guide visitors to the full post. However, by default, this link often comes underlined, which might not always match your site's aesthetic.
By default, Squarespace 7.1 adds an underline or hover effect to navigation links in your site header — but it may not always match your brand’s color palette.
All work in this guide is provided ‘as-is’. Other than as provided this guide makes no other warranties, expressed or implied, and hereby disclaims all implied warranties, including any warranty of fitness for a particular purpose.
If you require professional advice, you can book our consultation services.