Encode URLs the right way for the context you are working in
URL encoding looks simple until reserved characters start breaking your query string or path. This tool helps you choose between encoding a component and encoding a full URL, which matters because encodeURIComponent and encodeURI intentionally preserve different characters. By trying both locally in the browser, you can see exactly how spaces, ampersands, equals signs, hash symbols and slashes are handled before you paste the result into code or an API request.
Why the distinction matters
A query parameter needs stricter escaping than an entire URL. If you encode too much, you can damage the structure of a link. If you encode too little, a server may split a value in the wrong place or treat special characters as separators. This tool makes that difference visible so you can tell whether you are preparing a single parameter, a path segment or a full address.
Practical workflow
A good habit is to paste a sample value, compare the component-encoded and full-URL-encoded outputs, and then choose the version that matches your use case. That is especially useful when you are building fetch requests, form submissions or deep links with dynamic values. If the output still looks surprising, it usually means the original string contains characters that need a different encoding strategy. Seeing both outputs side by side is often the fastest way to avoid broken links.
Tiny Online Tools






