NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #976 most downloaded on npm
Normalize a URL
Last release 4 months ago
20 May 2026
Release timing varies
gaps range from 4 weeks to 1.3 years
Some releases are documented
notes for 28 of 57 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
57 releases · first in 2015
Fix removeExplicitPort option not working for localhost ef8df19
Add customProtocols option 0c6c6b9
customProtocols option 0c6c6b9emptyQueryValue option 2f2536eOne column per quarter.
Fix removeDirectoryIndex option to handle trailing slashes consistently 320d9b3
Add removePath and transformPath option dfcfc06
removePath and transformPath option dfcfc06Fix handling of encoded backslash (#192) 07c9a7b
Fix handling of protocol-less URLs with a port dec5dc6
Ignore URLs with custom protocols and just pass them through (#178) 882cb84
https, http, file, data.ftp protocol is no longer normalized. It's just passed through.user:password@sindresorhus.comdefaultProtocol option accept protocol without colon c7fd781
Add removeExplicitPort option (#174) 192223b
removeExplicitPort option (#174) 192223bAdd keepQueryParameters option (#173) 6e24307
keepQueryParameters option (#173) 6e24307Fix encoding consistency with sorted and non-sorted URL parameters (#158) c42f53b
Fix the removeDirectoryIndex option TypeScript type 4d35ea1
removeDirectoryIndex option TypeScript type 4d35ea1https://github.com/sindresorhus/normalize-url/compare/v7.0.1...v7.0.2
Fix Safari compatibility (#148) d51cb50
https://github.com/sindresorhus/normalize-url/compare/v7.0.0...v7.0.1
Require Node.js 12.20 (#138) 9a44d07
https://github.com/sindresorhus/normalize-url/compare/v6.1.0...v7.0.0
Accept a boolean for the removeQueryParameters option (#136) 6216336
removeQueryParameters option (#136) 6216336https://github.com/sindresorhus/normalize-url/compare/v6.0.1...v6.1.0
Fix ReDoS vulnerability for data URLs b1fdb51
Also fixed for v5 in 5.3.1 and for v4 in 4.5.1. Versions below 4.3.0 are not affected by this.
https://github.com/sindresorhus/normalize-url/compare/v6.0.0...v6.0.1
Add `stripTextFragment` option (#130) 01a4a91 It should not affect most use-cases, but it is turned on by default and it does change the URL slightly,
stripTextFragment option (#130) 01a4a91
It should not affect most use-cases, but it is turned on by default and it does change the URL slightly, so it's marked as breaking just to be safe.https://github.com/sindresorhus/normalize-url/compare/v5.3.0...v6.0.0
Nothing published for this version
Throw a friendly error on view-source: input (#124) ddf2584
view-source: input (#124) ddf2584https://github.com/sindresorhus/normalize-url/compare/v5.2.1...v5.3.0
Fix removeSingleSlash option adding slashes (#122) 1e06753
removeSingleSlash option adding slashes (#122) 1e06753https://github.com/sindresorhus/normalize-url/compare/v5.2.0...v5.2.1
Add `removeSingleSlash` option (#120) 18effbe
removeSingleSlash option (#120) 18effbehttps://github.com/sindresorhus/normalize-url/compare/v5.1.0...v5.2.0
Improve stripWWW logic (#117) 0ee9d94
stripWWW logic (#117) 0ee9d94https://github.com/sindresorhus/normalize-url/compare/v5.0.0...v5.1.0
Note that if you're using normalize-url in the browser, you should probably stay on v4 as this version uses newer syntax not available in all browsers
Note that if you're using normalize-url in the browser, you should probably stay on v4 as this version uses newer syntax not available in all browsers.
import normalizeUrl from 'normalize-url'; to import normalizeUrl = require('normalize-url');https://github.com/sindresorhus/normalize-url/compare/v4.5.0...v5.0.0
Nothing published for this version
Strip default MIME type and charset in data URLs (#100) 308909b
https://github.com/sindresorhus/normalize-url/compare/v4.4.1...v4.5.0
Fix data URL should not support query strings (#97) fb92bcb
https://github.com/sindresorhus/normalize-url/compare/v4.4.0...v4.4.1
Add data URL support (#95) 7df5aff
https://github.com/sindresorhus/normalize-url/compare/v4.3.0...v4.4.0
Refactor TypeScript definition to CommonJS compatible export (#93) 566d22f
https://github.com/sindresorhus/normalize-url/compare/v4.2.0...v4.3.0
Add TypeScript definition (#88) 35ce2d4
https://github.com/sindresorhus/normalize-url/compare/v4.1.0...v4.2.0
Remove multiple slashes if they are at the start of pathname (#78) a76edbd
Hard-deprecate some deprecated options f066795
Breaking:
stripHash option false by default 211322bstripAuthentication option that is enabled by default f0f3e81Other:
stripProtocol option 211322bhttps://github.com/sindresorhus/normalize-url/compare/v3.3.0...v4.0.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →