Path Segments or Query Parameters? How to Encode User Input in URLs
Learn when user input belongs in a URL path or query parameter, how to encode each safely, and how to handle Unicode, reserved characters, and double encoding.
Practical guides for cleaner URLs, smarter SEO, and a more thoughtful web. Find your next useful idea.
Explore the journal
4 articles
Learn when user input belongs in a URL path or query parameter, how to encode each safely, and how to handle Unicode, reserved characters, and double encoding.
Learn to parse and modify URLs with JavaScript’s URL API. Resolve relative links, handle duplicate query parameters, encode values, and validate destinations.
Build a Manifest V3 Chrome extension that parses pasted URLs into scheme, hostname, path, query, and fragment—without broad permissions or unsafe handling.
Build a minimal Manifest V3 Chrome extension that removes selected tracking parameters from pasted URLs while preserving functional query parameters.