Zero Signup ToolsFree browser tools

Developer Tools

HTML Tag Counter

Paste HTML and see how many times each tag appears, the deepest nesting level, and attribute usage on common tags. Browser-only.

0 chars

Counting scope

Choose what part of the parsed document to include.

Tag frequency table

Showing 0 of 0 distinct tags.

Sort by
Paste HTML above to see how many times each tag appears.

How to use

  1. Paste any HTML page or fragment into the input area. Click Load sample to try the counter with a small example document.
  2. Choose a counting scope: Whole document includes head tags such as meta and link, Body only skips them and is best for fragments.
  3. Read the live stats card for total elements, distinct tags, max nesting depth, and the most common tag, then read the frequency table to see every tag with a count and percentage.
  4. Sort the table by Count or Alphabet and flip Descending or Ascending to look at the lightest or heaviest tags.
  5. Scroll to the Attribute usage by tag panel to see how many a, img, link, meta, script, input, and button elements use each common attribute.
  6. Click Copy CSV or Copy plain text to export the table, or click Copy next to any row to grab that tag name.

About this tool

HTML Tag Counter parses any HTML markup and reports a sortable frequency table of every tag it finds. Paste a full page or a fragment and the tool shows the total element count, the number of distinct tags, the deepest nesting level (with the path that reaches it), and the most common tag. A toggle decides whether the count covers the whole document (including head metadata such as meta, link, and title) or only the body, which is convenient when you paste a snippet from inside an article or component. Custom elements (tags whose name contains a hyphen, like a web component) are detected automatically and tagged in the table so you can spot them quickly. For the noisy interactive and metadata tags (a, img, link, meta, script, input, button), a second panel breaks down attribute usage so questions like how many anchors have a rel value, how many images carry an alt text, how many meta tags have a property attribute, or how many scripts are async are answered at a glance. Results can be copied as CSV for spreadsheets or as a plain-text aligned report for changelogs. The HTML is parsed with the browser's built-in DOMParser into a detached document, so any script tags inside the markup are inert and never execute, and nothing you paste is uploaded anywhere.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsDeveloper Tools