URL encoding (also called percent-encoding) replaces unsafe characters in a URL with their percent-prefixed hexadecimal byte representation. Spaces become %20, ampersands become %26, equals signs become %3D, and so on. This is required when you pass arbitrary text in URL paths, query strings, or fragment identifiers, because many characters have special meaning in URL grammar and would break the URL if used directly. This tool encodes and decodes URL-safe percent-encoded strings in either direction, using the modern encodeURIComponent semantics that match what browsers and HTTP libraries actually use. Paste an unencoded URL or text to get the encoded form, or paste an encoded URL to recover the original characters.
Frequently asked questions
Both encode spaces but apply in different contexts. %20 is the modern URL-safe encoding used in paths and query strings. The plus sign is a legacy encoding used specifically in application/x-www-form-urlencoded form submissions. They are interchangeable in most modern systems, but this tool produces %20 because encodeURIComponent (the JavaScript primitive used here) outputs %20.
Related tools
- Base64 Encoder & DecoderConvert any text or binary data to and from Base64 in your browser.
- URL Slug GeneratorStrip accents, punctuation, and spaces to produce a clean URL-safe slug from any title.
- HTML Entity Encoder and DecoderEncode HTML reserved characters as entities or decode entities back to their original characters.