URL Encoder & Decoder
Encode a destination URL for nesting inside a click tracker, or decode one to see what a tracker is really pointing at. The decoder reports encoding depth, because the usual failure in ad ops is not missing encoding but too much of it.
Output
Output will appear here.
Runs in your browser · nothing sent, stored, or logged
Formula
encodeURIComponent(value) · encodeURI(url) · decodeURIComponent(value)Component encoding escapes the structural characters of a URL so it can safely become a parameter value. Full-URL encoding preserves them. Decoding reverses one pass at a time, which is how the depth is measured.
Encode exactly once
A destination URL nested inside a click tracker needs to be component-encoded once. Encode it twice and every percent sign becomes %25, so %3A becomes %253A, and the receiving server decodes only one layer — leaving a destination full of literal percent sequences that no browser can resolve. Encode it zero times and the first ampersand in your query string terminates the parameter, silently truncating everything after it. Both failures look identical from the outside: the ad serves, the click registers, and the user lands somewhere wrong.
Where the extra pass usually comes from
Almost never from someone encoding by hand twice. It comes from a platform macro that already escapes its value being pasted into a field that escapes again, or from a URL that was encoded for one tracker and then reused inside a second. When a link works pasted into a browser but fails when trafficked, decode it here first: if it takes two passes to reach a readable URL, you have found the problem without needing to test a single impression.
Frequently asked questions
- What is the difference between the two encode modes?
- Component encoding escapes everything that has meaning in a URL, including :// ? & and =. Full-URL encoding leaves those structural characters intact and only escapes spaces and other unsafe characters. Nesting a destination inside a click tracker needs component encoding; tidying up a single URL needs full.
- How do I know if something is double-encoded?
- Look for %25 sequences. %25 is an encoded percent sign, so %253A is really an encoded %3A, which is itself an encoded colon. The decoder here reports the encoding depth, so you can see how many passes it takes to reach a clean URL.
- Why does my click tracker drop everything after the first ampersand?
- Because the destination was not component-encoded when it was nested. The receiving server reads the first unencoded ampersand as the end of your destination parameter and the start of one of its own, so everything after it is lost. Encoding the destination once fixes it.
- Do ad server macros need encoding?
- It depends on the macro. Most platforms offer both an escaped and an unescaped variant — for example a click macro that percent-encodes the destination and one that does not — and picking the wrong one produces exactly the double-encoding or under-encoding problems above. Check which variant the receiving system expects before trafficking.