Parse URLs in JavaScript

How to break apart, build, and modify URLs using the built-in URL API. Works in browsers and Node.js.

12 min readUpdated January 2026
Was this page helpful?
Share:

Try it yourself

Put this into practice with URL Editor

Open URL Editor