Developer3 min

Common URL encoding mistakes that break links and redirects

A practical guide to the most common URL encoding mistakes, including double encoding, broken query strings, bad parameters and redirect issues.

Double encoding is the fastest way to ruin a URL

A common mistake is encoding a value more than once. A query parameter like `a%20b` can turn into `a%2520b` after a second pass, which makes the URL harder to read and often changes what the backend receives.

This usually happens when one layer encodes the value and another layer does it again before building the final link. The fix is simple: encode once at the point where the raw value enters the URL, then leave it alone.

Broken queries and redirects usually come from mixed contexts

Another frequent problem is using the wrong encoding rules for the wrong part of the URL. Query parameters, path segments and redirect targets do not behave the same way, so a value that looks safe in one place can break in another.

Redirects are especially sensitive because an already encoded destination can get decoded, re-encoded or truncated by intermediate systems. If a link contains spaces, ampersands or reserved characters, verify the final output before shipping it.

Related

Similar tools

DeveloperFeatured

JSON Formatter

Format, validate and beautify JSON directly in the browser for debugging, APIs and quick payload review.

Open tool
DeveloperFeatured

JSON Minifier

Minify and validate JSON directly in the browser for smaller payloads, transport and embedding.

Open tool
Developer

Base64 Decode

Decode Base64 strings back to plain text online for free.

Open tool
Developer

Base64 Encode

Encode plain text to Base64 online for free in seconds.

Open tool
Developer

UUID Generator

Generate UUID v4 values online for free for testing, databases and development.

Open tool
Developer

Hash Generator

Generate MD5 and SHA-256 hashes from plain text online for free.

Open tool

Insights

Articles connected to this tool

Developer3 min

URL encoding vs Base64: when to use each one

Compare URL encoding and Base64 to choose the right option for query strings, payloads, redirects and API data.

Read article
Developer3 min

When to use a URL encoder or decoder

A practical guide to percent encoding, query strings and when URL encoding or decoding is useful in debugging, redirects and web development.

Read article

Linked tools

Move from guide to action

All tools
Developer

Base64 Decode

Decode Base64 strings back to plain text online for free.

Open tool
Developer

Base64 Encode

Encode plain text to Base64 online for free in seconds.

Open tool
Developer

URL Encoder / Decoder

Encode and decode URL values directly in the browser for free.

Open tool