Skip to content
ZeroServer.tools

CSS Class Extractor

Extract all unique CSS class names from HTML — sorted by frequency or alphabetically.

32 unique classes
flex2×
font-bold2×
hover:text-blue-6002×
nav-link2×
text-gray-6002×
bg-gradient-to-r1×
bg-white1×
container1×
from-blue-5001×
gap-41×
hero1×
hero-subtitle1×
hero-title1×
items-center1×
justify-between1×
main-content1×
mt-21×
mx-auto1×
nav1×
nav-logo1×
nav-menu1×
p-81×
px-41×
py-81×
rounded-xl1×
shadow-sm1×
site-header1×
text-4xl1×
text-lg1×
text-white1×
text-white/801×
to-purple-5001×

How CSS class extraction works

The extractor scans HTML for class="…" and className="…"attributes (JSX-friendly) using a regex tokenizer — no DOMParser required. Each attribute value is split on whitespace, classes are counted, and duplicates merged. The frequency count helps identify utility classes used most across a template.

To format the HTML itself, try HTML Formatter. For CSS formatting, see CSS Formatter. To extract hyperlinks, use Link Extractor.

Private & free — this tool runs entirely in your browser.

Recommended: IndieKit Ship your Next.js startup in days.affiliate

Related Developer Utilities tools