URL Encoder & Decoder — Encode URLs and Query Strings

Encode special characters for safe use in URLs or decode percent-encoded strings back to readable text. All processing happens in your browser.

Input
Output

Frequently Asked Questions

What is URL encoding?

URL encoding (also called percent-encoding) replaces unsafe or reserved characters in a URL with a percent sign (%) followed by two hexadecimal digits representing the character's byte value. For example, a space becomes %20 and an ampersand becomes %26.

When should I encode URLs?

You should encode URLs whenever you include user-generated text in query parameters, form data, or path segments. Characters like spaces, ampersands, question marks, and non-ASCII characters must be encoded to ensure the URL is valid and parsed correctly by browsers and servers.

What is %20?

%20 is the percent-encoded representation of a space character. In URL query strings, spaces can also be represented as a plus sign (+), though %20 is the universally accepted encoding that works in all parts of a URL.

How do I encode special characters in URLs?

Use JavaScript's encodeURIComponent() to encode individual values (query parameters, path segments), or encodeURI() to encode a full URL while preserving structural characters like ://, /, and ?. This tool supports both modes.

Related tools: Base64 Encoder / Decoder · Slug Generator