When URL encoding matters
URLs are not free-form text. Characters such as spaces, ampersands, question marks, percent signs, and non-English letters can change the meaning of a URL unless they are encoded correctly. This matters when you build search links, redirect URLs, OAuth callback parameters, analytics tags, and API requests by hand.
This tool focuses on the practical developer workflow: paste a value, encode it safely, decode a suspicious URL from logs, or break a query string into key-value pairs so you can see exactly what a browser or API client is sending.
Worked examples
A query value like Jane Doe & Sons becomes Jane%20Doe%20%26%20Sons. The ampersand must be encoded because a raw ampersand separates query parameters.
A redirect target such as https://example.com/account?tab=billing should be encoded before it is placed inside another query parameter. Otherwise, the nested question mark and equals sign can be interpreted as part of the outer URL.
Common mistakes
- Encoding an entire URL when only a query value should be encoded.
- Decoding a value twice, which can turn a literal
%25into a broken percent sequence. - Mixing
+space encoding from forms with%20encoding from JavaScript. - Forgetting that path segments and query values have different reserved characters.
Frequently asked questions
What does URL encoding do?
URL encoding replaces characters that are unsafe in URLs with percent-encoded byte sequences. A space becomes %20, an ampersand becomes %26, and non-ASCII text is encoded as UTF-8 bytes.
Should I encode a whole URL or only a query value?
Usually you encode individual query values, not the entire URL. Encoding a complete URL will also encode characters like : and /, which can make it unusable as a normal web address.
Is this the same as form encoding?
Not exactly. HTML form encoding often uses + for spaces in query strings. This tool uses encodeURIComponent, which encodes spaces as %20. Both formats are common, but they are not identical.
Is my URL sent to a server?
No. Encoding, decoding, and query inspection run locally in your browser. Nothing you paste is uploaded or stored.
Related tools
- URL Encoding Guide for a deeper explanation of percent-encoding and query string bugs.
- Base64 Encoder/Decoder for transport-safe text conversion.
- JSON Formatter for inspecting API responses after decoding query payloads.