Free Website Hit Counter

Track the number of visitors to your website with a simple and lightweight hit counter.

001234
Embed Code — paste into your HTML
How it works: Paste the generated code into your website's HTML where you want the counter to appear. The counter uses counterapi.dev — a free, reliable service. Each page load increments the count automatically.
Copied!

Related Tools

What Is a Website Hit Counter?

A website hit counter is a small piece of code you embed in your page that increments a number every time someone loads it. The count is stored externally and displayed on your site in real time. It’s one of the simplest ways to show visitor activity — no analytics dashboard, no login, just a number that goes up.

This tool generates the embed code for you. Pick a counter style, set a starting number, choose your colors, and copy the HTML snippet. Paste it into your page wherever you want the counter to appear.

Counter Styles Available

Simple — Plain text count, minimal and clean. Works in any layout without clashing with your design.

Boxed — Count displayed inside a bordered box with a background color. Good for sidebars or footers where you want the counter to stand out slightly.

Retro — Styled to look like a classic digital display. Popular for personal sites and portfolio pages that want a nostalgic feel.

Odometer — Animated rolling digits, like a mechanical counter. Visually satisfying and draws attention on landing pages.

How to Add the Counter to Your Website

  1. Enter your website URL in the field above
  2. Set your starting count — useful if you’re migrating from another counter and want to carry over your existing number
  3. Choose a style and customize colors
  4. Click Generate Counter Code
  5. Copy the embed snippet and paste it into your site’s HTML where you want the counter to show

For WordPress: Paste the code into a Custom HTML widget in your sidebar or footer, or use a plugin like WPCode to insert it into specific page templates.

For static HTML sites: Paste directly into the <body> of your HTML file at the position you want the counter.

For Blogger: Use the HTML/JavaScript gadget widget in your layout editor.

What Powers the Counter

This tool uses counterapi.dev — a free, lightweight API that stores and serves hit counts. Each unique namespace (your website URL) gets its own counter. Every page load with your embed code makes a request to the API, which increments the count and returns the updated value to display.

The counter increments on every page load, including repeat visits from the same user. It measures total hits, not unique visitors. For unique visitor tracking and detailed analytics, Google Analytics or a similar platform is more appropriate. The hit counter is best for displaying a general visitor tally publicly on your site.

Hit Counter vs Google Analytics

These tools serve different purposes and work well alongside each other. A hit counter shows a visible number on your page — it’s a public-facing display of traffic. Google Analytics tracks detailed behavior: which pages users visit, how long they stay, where they came from, and what device they use.

If you want to understand your audience deeply, use analytics. If you want a simple badge on your site showing total visits — for social proof, engagement, or nostalgia — a hit counter is the right tool.

Frequently Asked Questions (FAQ)

This counter increments on every page load, including repeat visits from the same browser. It tracks total hits, not unique visitors. If you want unique visitor counts, you’ll need an analytics platform like Google Analytics or Plausible. Hit counters are best used as a general traffic display on your page rather than for precise audience measurement.

Yes — the tool has a “Start Count From” field. Enter any number and the counter will begin displaying from that value. This is useful if you’re switching from another counter service and want to preserve your existing visit count, or if you want to start from a round number for display purposes.

No. The counter loads asynchronously — it doesn’t block your page from rendering. The script fetches the count from counterapi.dev in the background after the main content has loaded. The impact on page speed is negligible for most websites.

Go to Appearance → Widgets and add a Custom HTML widget to your sidebar or footer. Paste the embed code generated by this tool into the widget. Save the widget and the counter will appear on your site. Alternatively, install the WPCode plugin and use it to inject the counter code into specific page templates without touching theme files.

Yes — generate a separate counter for each page or site by entering a different URL each time. Each URL gets its own independent count stored under a unique namespace. If you use the same URL across multiple pages, they’ll all share and increment the same counter, which may or may not be what you want depending on your use case.