whatwg-url
npmv17.1.0An implementation of the WHATWG URL Standard's URL API and parsing machinery
Safe to adopt
Yes — whatwg-url scores well across adoption, maintenance, weight, supply chain, and licensing. 204.4M downloads per week and 3 known dependents. Last published 65 days ago. 9 releases in the last 2 years.
- AAdoption: grade A, Excellent.
204.4M downloads per week and 3 known dependents.
- AMaintenance: grade A, Excellent.
Last published 65 days ago. 9 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 4 transitive packages, about 819 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 6 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding whatwg-url to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing whatwg-url, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node ^22.14.0 || >=24.0.0
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the whatwg-url README.
const result = parseURLWithValidationErrors("https://example.org/%s");
console.log(result.url === null); // false
console.log(result.validationErrors); // [ "invalid-URL-unit" ]Dependencies
Declared by whatwg-url v17.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (7)
Used by
Popular packages that depend on whatwg-url.
MongoDB connection strings, based on the WhatWG URL API
A JavaScript implementation of many web standards
Derivative of whatwg-url without unicode handling and optimized for Expo
Relationship graph
Dependencies (left) and dependents (right) of whatwg-url.
Frequently installed together
An AST-based pattern checker for JavaScript.
An HTTP/1.1 client, written from scratch for Node.js
Check whether a given string matches the `PotentialCustomElementName` production as defined in the HTML Standard.
Validates whether a string matches the production for an XML name or qualified name
🔎 A simple, tiny and lightweight benchmarking library!
A per-spec XML serializer implementation
The semantic version parser used by npm.
Implements the WebIDL algorithms for converting to and from JavaScript values
Parses, serializes, and manipulates MIME types, according to the WHATWG MIME Sniffing Standard
An arbitrary-precision Decimal type for JavaScript.
Calculate specificity of a CSS Selector
CSS color - Resolve and convert CSS colors.
Release history
9 releases in the last two years, typically about 64 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 17.1.0latest | 2 months ago | 121 KB | MIT |
| 17.0.0 | 2 months ago | 103 KB | MIT |
| 16.0.1 | 6 months ago | 99 KB | MIT |
| 16.0.0 | 7 months ago | 99 KB | MIT |
| 15.1.0 | 11 months ago | 98 KB | MIT |
| 15.0.0 | 1 year ago | 98 KB | MIT |
| 14.2.0 | 1 year ago | 96 KB | MIT |
| 14.1.1 | 1 year ago | 97 KB | MIT |
| 14.1.0 | 1 year ago | 97 KB | MIT |
| 14.0.0 | 2 years ago | 96 KB | MIT |
| 13.0.0 | 3 years ago | 96 KB | MIT |
| 12.0.1 | 3 years ago | 93 KB | MIT |
| 12.0.0 | 3 years ago | 93 KB | MIT |
| 11.0.0 | 4 years ago | 92 KB | MIT |
| 10.0.0 | 4 years ago | 92 KB | MIT |
Overview
whatwg-url is an npm package that an implementation of the WHATWG URL Standard's URL API and parsing machinery. It is extremely widely used, with about 204.4M downloads per week and 3 known dependents in the graph. The latest version is 17.1.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need an implementation of the WHATWG URL Standard's URL API and parsing machinery and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (204.4M weekly downloads).
- Clear open-source license (MIT).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use whatwg-url?
Yes — whatwg-url scores well across adoption, maintenance, weight, supply chain, and licensing. 204.4M downloads per week and 3 known dependents. Last published 65 days ago. 9 releases in the last 2 years.
How do I install whatwg-url?
Run `npm install whatwg-url` to add whatwg-url to your npm project.
How many dependencies does whatwg-url have?
whatwg-url declares 10 direct dependencies and pulls in 4 packages in total once its runtime tree is resolved totalling about 819 KB on disk.
What license is whatwg-url released under?
whatwg-url is distributed under the MIT license. Its dependency tree also includes: BSD-2-Clause, MIT.
How popular is whatwg-url?
whatwg-url has approximately 204,357,824 downloads per week and 3 known dependent packages.
Is whatwg-url still maintained?
The most recent release of whatwg-url (v17.1.0) was published 2 months ago.
Does whatwg-url run install scripts?
No. whatwg-url does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.