URL Encoder / Decoder

Percent-encode text for safe use in URLs and query strings, or decode encoded URLs back to readable text. Paste a full URL to see its parts broken down.

  • Component or full-URL mode
  • Form (+) encoding
  • URL breakdown

How to use the URL Encoder / Decoder tool

  1. Paste your text or URLEnter the text to encode, or an encoded URL to decode.
  2. Pick the encoding type“Component” for a single query value or path segment; “Full URL” to keep characters like : / ? & = intact.
  3. Encode or decodeClick the button you need. Tick “Spaces as +” for HTML form data.
  4. Copy or inspectCopy the result. When you decode a full URL, its protocol, host, path and query parameters are listed in a table.

Features

  • Two encoding modesMatches JavaScript’s encodeURIComponent and encodeURI, the two functions developers use most.
  • Strict RFC 3986Component mode also encodes ! ' ( ) *, which some servers treat specially.
  • Form encodingConvert spaces to + and back, as used by application/x-www-form-urlencoded.
  • URL breakdownRead every query parameter of a long tracking or API URL at a glance.
  • Unicode supportNon-English text and emojis are encoded as UTF-8 bytes.

What is URL encoding?

URLs can only contain a limited set of characters: letters, digits and a few symbols such as - _ . ~. Other characters, including spaces, accented letters and symbols that have special meaning in a URL (like ?, & and #), must be percent-encoded. Each byte is written as a % followed by two hexadecimal digits. A space becomes %20, & becomes %26 and é becomes %C3%A9 (its two UTF-8 bytes).

Component vs full URL encoding

ModeEncodesUse it for
ComponentEverything except letters, digits and - _ . ~A single query parameter value, a path segment, a filename
Full URLSpaces and unsafe characters, but keeps : / ? # & = +A complete URL that already has the right structure

Example: to put tea & coffee into ?q=, encode it as a component: tea%20%26%20coffee. If you used full-URL mode, the & would be left as is and the server would think a new parameter starts there.

%20 or +?

Both can represent a space, but in different places. In the query string of HTML form submissions (application/x-www-form-urlencoded), spaces are written as +. Everywhere else in a URL, including paths, a space must be %20. Tick “Spaces as +” only when you are working with form data.

Common problems this tool helps with

  • Double encoding: %2520 in a URL means a %20 was encoded again. Decode twice to get the original text.
  • Broken links: URLs copied from documents can contain raw spaces or special characters. Encode them in full-URL mode.
  • Reading tracking links: decode long marketing or redirect links to see where they really go and which UTM parameters they carry.
  • “URI malformed” errors: a lone % not followed by two hex digits cannot be decoded. Replace it with %25.

Frequently asked questions

What does %20 mean in a URL?
%20 is the percent-encoded form of a space character. Similarly, %2F is a slash and %26 is an ampersand.
What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps characters that structure a URL, such as : / ? & =. encodeURIComponent encodes them too, which is what you need for a single parameter value.
Why do I get an error when decoding?
The input contains a % sign that is not followed by two valid hexadecimal digits. Encode a literal percent sign as %25.
Does it support non-English characters?
Yes. Characters are converted to UTF-8 bytes and each byte is percent-encoded, which is the web standard.
Is my data sent anywhere?
No. Encoding and decoding happen in your browser.