URL Encoder/Decoder

Encode and decode URLs to handle special characters.

Text & SEO Tools

Encode & Decode URLs Online: Handle Special Characters, Query Strings & UTM Parameters

Have you ever clicked a link in an email or web app only to be greeted by a confusing 400 Bad Request error, or noticed that half of your campaign tracking parameter was mysteriously chopped off in Google Analytics?

This common issue happens because Uniform Resource Identifiers (URLs) are strictly governed by internet RFC specifications that permit only a tiny subset of US-ASCII characters. Characters like spaces, question marks, slashes, ampersands, and quotes have reserved meanings in URL architecture.

When you want to pass search queries, user names, or nested redirect URLs as parameters, those reserved characters must undergo percent-encoding.

Our free online URL Encoder and Decoder allows web developers, SEO specialists, and digital marketers to sanitize query strings into valid percent-encoded URLs—or paste scrambled web addresses to quickly read human-friendly text.

Quick Reference: Common Percent-Encoded URL Characters

CharacterPercent CodeWhy It Must Be Encoded
[Space]%20 (or +)Raw spaces break web URLs and terminate link parsing in chat apps
&%26Reserved to separate distinct query parameters (?a=1&b=2)
?%3FReserved to mark the start of query parameters
/%2FReserved to delimit path hierarchies between directory folders
#%23Reserved to identify in-page anchor fragments and browser hash routes
=%3DReserved to assign values to query parameter keys (key=value)
@%40Delimits user credentials in HTTP authentication schemes

encodeURI vs. encodeURIComponent: A Critical Difference

One of the most frequent sources of web application bugs in JavaScript development is using the wrong encoding function:

encodeURI() — For Full URLs

Designed to encode a complete web address. It deliberately spares functional URL delimiters such as : / ? # & =.

Input: https://example.com/search?q=shoes & socks
Output: https://example.com/search?q=shoes%20&%20socks

encodeURIComponent() — For Query Values

Encodes every reserved character so that an entire sub-URL or string can be safely passed inside another parameter without altering the host URL structure.

Input: https://site.com/sub
Output: https%3A%2F%2Fsite.com%2Fsub

Why Proper URL Encoding Protects SEO and Campaign Tracking

Preserving Marketing Analytics (UTM Parameters)

If your newsletter campaign name contains an ampersand (e.g., utm_campaign=black_friday_deals&discounts), an unencoded ampersand causes Google Analytics to treat "discounts" as a nonexistent parameter, corrupting your conversion attribution.

Preventing Broken Redirect Loops (OAuth & SSO)

OAuth login callbacks rely on a redirect_uri parameter. Failing to encode the destination URL properly breaks the login handshake, stranding users on a blank authentication screen.

Safe International Domain Names & Non-Latin Scripts

Web addresses containing non-Latin characters (Devanagari, Cyrillic, Chinese, Kanji, Arabic) must be percent-encoded to travel across standard DNS and web server routing rules.

Frequently Asked Questions

What is the difference between %20 and a plus sign (+) in URLs?

In strict percent-encoding (RFC 3986), a space character is always encoded as %20. However, the older HTML 4.01 form specification (application/x-www-form-urlencoded) allowed spaces inside query strings to be represented by a plus sign (+). Modern servers generally accept both, but %20 is universally compliant across path segments and query parameters.

Can URL encoding protect against Cross-Site Scripting (XSS)?

Percent-encoding helps ensure that special characters such as < and > are not interpreted as live HTML tags when reflected back in links. However, it must be paired with proper context-aware HTML entity escaping on the backend for complete security.

Is there any data logged when I encode or decode links here?

No. URL encoding and decoding operations execute entirely in your local browser window. None of your web addresses, secret API tokens, or tracking parameters are sent to our servers.