URL Encoder & Decoder

Safely encode strings to be used in URLs, or decode URL-encoded strings back to their original form.

Input String
Encoded Result
Checking membership…

Developer guide

About URL Encoder

What is URL encoding?

URL encoding represents characters that have special meaning or are not safe in a URL using percent-encoded bytes. A space may become %20, while reserved characters such as ?, &, and = should be encoded when they are data inside a component but preserved when they delimit the URL structure. Encoding the whole URL when only one query value needed encoding is a common source of broken links.

How to encode URL values safely

Separate the URL into its components, then encode a path segment or query value with the API that matches that component. Preserve existing delimiters and avoid repeated encode/decode cycles that turn percent signs into data. Normalize and validate the destination origin before using a decoded value in a redirect or request. A correctly encoded string can still point to an untrusted host, so encoding never replaces allow-list validation.

Why client-side URL encoding matters

Callback parameters and diagnostic links often contain identifiers that should remain in the developer's session. Local encoding is immediate and avoids creating a copy on a remote service. Use the output as a representation, not a security boundary: browsers, servers, proxies, and frameworks can normalize URLs differently. Test the final request with repeated parameters, Unicode characters, reserved delimiters, and an empty value.