Component encoding escapes reserved characters such as / ? & = so a value is safe inside a query string. Full-URL encoding leaves those characters alone so the address stays valid.
Side by side
| Component encoding | Full-URL encoding | |
|---|---|---|
| Escapes / ? & = # | Yes | No |
| Use for | A single query value | An entire URL |
| Example input a b&c | a%20b%26c | a%20b&c |
When to use which
Encode each value on its own with component encoding, then assemble the URL. Encoding a whole URL as a component breaks its structure.