🧰 ToolPicoAll Tools →

HomeBlog › Why Is My Link Full of %20?

Why Is My Link Full of %20 and %C3%A9? A Practical URL Encoding Guide

If you've ever pasted a link and seen it turn into a wall of percent signs and letters, this guide explains exactly what's happening, why it's necessary, and how to encode or decode text yourself in a few seconds.

In this guide

What is URL encoding, and why does %20 keep showing up?

Quick answerURL encoding (percent-encoding) converts characters that can't safely appear in a URL — spaces, accented letters, emoji, and reserved symbols like &, ?, and # — into a %XX format. A space becomes %20; an accented letter like é becomes %C3%A9 in UTF-8.

A URL is really just a plain-text address, but its structure depends on a handful of reserved characters: ? starts the query string, & separates parameters, # marks a fragment, and so on. If your actual text contains a space, an ampersand, or a non-ASCII letter, the browser or server can't tell whether that character is part of your content or part of the URL's structure. Percent-encoding solves this by replacing the ambiguous character with its byte value in hex, prefixed by %.

For example, searching for "running shoes" on a site turns into ?search=running%20shoes in the address bar — the space became %20 so the query string stays in one piece. Modern browsers use UTF-8 for this, so multi-byte characters (accented letters, most emoji) get encoded as two or more %XX groups in a row — that's why "café" turns into caf%C3%A9 rather than a single code.

encodeURIComponent vs encodeURI — which one do I actually need?

Quick answerencodeURIComponent() encodes a single piece of a URL (like one parameter value) and also escapes structural characters such as &, =, and /. encodeURI() encodes a whole address and leaves those structural characters alone so the URL still works.

This distinction trips a lot of people up, and it's the single most common mistake when building links by hand. If you encode a full URL with encodeURIComponent(), the slashes and colon in https:// get mangled into %2F and %3A, breaking the link. If you encode just a search term with encodeURI(), an ampersand inside that term won't get escaped and can accidentally start a new query parameter.

Input (example)encodeURIComponentencodeURI
running shoesrunning%20shoesrunning%20shoes
a & ba%20%26%20ba%20&%20b
https://x.com/a?b=1https%3A%2F%2Fx.com%2Fa%3Fb%3D1https://x.com/a?b=1

Rule of thumb: use encodeURIComponent for a single value you're inserting into a query string or path segment; use encodeURI only when you have an entire address and want to preserve its structure while still escaping spaces and unsafe characters within it.

Query strings, building links, and cleaning up tracking parameters

Quick answerA query string is the key=value pairs after the ? in a URL, joined with & (e.g. ?color=red&size=42). Parameters like utm_source, gclid, and fbclid are tracking-only and can be safely removed before sharing a link.

Parsing a real-world URL usually means separating two different jobs: reading the parameters that were already there, and building a new link with your own parameters. Say you receive a marketing link like this (example values only):

https://shop.example.com/product?color=red&size=42&utm_source=instagram&utm_medium=cpc&fbclid=IwAR123abc

Only color and size affect what the page actually shows — utm_source, utm_medium, and fbclid exist purely so the destination site can attribute the click to a specific campaign or ad platform. Stripping them before you bookmark, forward, or publish the link keeps the URL shorter and doesn't leak which ad or post you clicked. On the flip side, when building a link yourself — say a support form that pre-fills a name and a city — each value needs its own encoding pass before being joined with &, otherwise a comma or space in "New York" would silently corrupt the next parameter.

One extra wrinkle worth knowing: a value can get encoded twice by mistake (e.g. by two different scripts in a pipeline), which produces odd-looking strings like %2520 — that's a literal space (%20) that got re-encoded, since % itself becomes %25. Resolving every layer at once, rather than decoding just once, is what fixes that.

Good to know: a Base64-encoded string (used for tokens, small files, or embedded images) is a completely different kind of encoding from URL/percent-encoding — but because Base64 can contain + and /, a Base64 value that's placed inside a URL sometimes needs an additional layer of URL encoding on top.

Encode, decode, parse a URL, build a query string, or strip tracking parameters — free and entirely in your browser.

Try the free URL Encode / Decode tool →

Frequently asked questions

What is URL encoding?
URL encoding (percent-encoding) converts characters that can't be used directly in a URL — spaces, accented letters, emoji, and reserved symbols like &, ?, and # — into a %XX format that browsers and servers can interpret safely. For example, a space becomes %20 and an accented letter like é becomes %C3%A9 in UTF-8. This lets text be added to an address or parameter without breaking the URL's structure.
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent() encodes a SINGLE piece of a URL, such as one query value, and also encodes structural characters like &, =, ?, and /. encodeURI() encodes an ENTIRE URL and leaves the characters a URL needs to work — such as :, /, ?, #, and & — untouched. Use encodeURIComponent for a single parameter value and encodeURI for a complete address.
How do you build a query string?
A query string is the set of key=value pairs that follow the '?' in a URL, separated by '&' (e.g. ?color=red&size=42). Enter your key-value pairs one by one in a query-builder tool's rows and click Build; the values are automatically and correctly percent-encoded into a complete query string or full URL.
Why do I sometimes see a double-encoded value like %2520?
%2520 is what you get when an already-encoded %20 (a space) gets encoded a second time, because the '%' character itself is encoded as %25. This is usually a sign that a system is encoding the same data twice by mistake (double encoding). Turning on multi-layer decode resolves every nested layer back to the original text in a single pass.
Can I remove tracking parameters like utm_source from a link?
Yes. Tracking parameters such as utm_source, utm_medium, utm_campaign, gclid, and fbclid can be identified in a parsed query string and stripped out, leaving only the parameters that actually change what the page shows. This is useful before sharing a link publicly or archiving it, since tracking parameters reveal where the traffic will be attributed but aren't needed for the page to load.

Related guides

Methodology note: examples in this guide use illustrative sample URLs and parameter names for clarity — they are not real tracking links. This article is for general informational purposes and is not legal, security, or professional advice; always review your own data-handling policies before sharing or publishing URLs that may contain personal information.