ClearURLs-compatible rule catalog and adapter for @url-sanitize/core.
Use it to remove tracking parameters such as utm_* and fbclid, and to
unwrap known tracking redirectors.
Ships a snapshot of the ClearURLs ruleset, daily-synced from upstream
https://rules2.clearurls.xyz/data.minify.json with SHA256 verification.
For the default v2 multi-source behavior, use @url-sanitize/merged.
npm install @url-sanitize/core @url-sanitize/clearurlsimport { compileSanitizer } from '@url-sanitize/core';
import { clearurlsCatalog } from '@url-sanitize/clearurls';
const sanitize = compileSanitizer(clearurlsCatalog);
sanitize('https://example.com/?utm_source=x');If you need the unprocessed ClearURLs JSON shape (for custom adapters or tooling), use the secondary entrypoint:
import { clearurlsRawData, clearurlsMetadata } from '@url-sanitize/clearurls/raw';If you only need the adapter without importing the bundled snapshot, use:
import { clearurlsToCatalog } from '@url-sanitize/clearurls/adapter';src/(adapter, types) — MITdata/data.json(bundled ClearURLs ruleset) — LGPL-3.0-only