Skip to content

URL Encode and Decode

Percent-encode text for URLs, or decode it back.

How to use the URL encode/decode

Three steps, all in your browser.

  1. 1

    Paste your input

    Type or paste your code or data. Press Sample to try an example.

  2. 2

    Choose the direction

    Encode or decode. Errors point at what's wrong with the input.

  3. 3

    Copy the result

    Copy the output in one click. Nothing is saved or sent anywhere.

URL Encode and Decode: what to know

URL encode/decode converts text to percent-encoding and back. Characters that aren't allowed in a URL, or that have a special meaning there, are written as % followed by two hex digits for each UTF-8 byte: a space becomes %20, & becomes %26 and é becomes %C3%A9. Decoding turns these sequences back into readable text.

There are two common levels of encoding. Encoding a component, as JavaScript's encodeURIComponent does, escapes everything except letters, digits and - _ . ! ~ * ' ( ), which is right for a single query parameter value or path segment. Encoding a full URL, as encodeURI does, leaves the characters that structure a URL (: / ? # & =) alone so the URL still works.

In HTML form submissions (application/x-www-form-urlencoded), a space is written as + instead of %20. Both are common in query strings, but only %20 means a space everywhere in a URL.

Popular uses

  • Building query strings with special characters
  • Reading encoded URLs from logs and analytics
  • Debugging redirect URLs passed as parameters
  • Encoding values for API requests and webhooks

Tips for the best result

  • Encode each parameter value separately, not the whole URL, or the & and = that separate parameters get escaped too.
  • %2520 in a URL means it was encoded twice: %25 is the encoded % sign.
  • Decoding a + as a space is only right for form-encoded query strings.

Read how JustYourDev works and our privacy details. Code, data and files you use here are processed in your browser and are never sent to our server.

Frequently asked questions

The way URLs carry characters that aren't allowed or have a special meaning: each byte becomes % followed by two hex digits. A space becomes %20 and é, which is two bytes in UTF-8, becomes %C3%A9.

%20 is correct anywhere in a URL. The + sign means a space only in form-encoded query strings (application/x-www-form-urlencoded). When in doubt, use %20.

encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ), so it's right for a single query value or path segment. encodeURI leaves characters such as / ? & = # alone, for encoding a whole URL.

No. Every tool runs in your browser, so your code, tokens, keys and files are processed on your device and are not sent to our server or stored. Reloading or closing the page clears them.

Yes. Every tool is free with no sign-up and no limits on use. Clearly labeled ads keep it that way.

Yes. The tools work in any modern browser on phones, tablets and computers, though large files and long code are easier to handle on a computer.