How do you recognize URL encoding?

Percent-encoded text is full of percent signs followed by two digits or letters from A to F: %20 is a space, %2F a slash and %C3%A9 the letter é. It turns up in links copied from the address bar, in query strings after the ?, in server logs and in redirect links that carry another address inside them. In query strings and form data, a plus sign between words usually stands for a space.

Tool description

Paste encoded text into the Encoded box, and the readable text appears in the Decoded box as you type, ready to copy. Pick the rules under Format:

  • URL component decodes every % code, for a single value or a link you want to read in full. Plus signs stay as they are.
  • Whole URL decodes everything except the codes of characters that give a URL its structure, such as %2F (/), %3F (?), %26 (&), %3D (=) and %23 (#), so the link still points to the same place.
  • Form data (spaces as +) also turns plus signs into spaces, as in form posts and many query strings.

Insert sample fills in sunny days & ice cream: 100% fun, encoded in the format you've picked, such as sunny%20days%20%26%20ice%20cream%3A%20100%25%20fun for URL component. To encode text instead, press the swap button between the boxes, which also moves the result into the input, or use the URL Encoder.

Examples

  • tea%20%26%20cake as a URL component: tea & cake
  • name=Sunny+Garden&flowers=tulips%2C+daisies as form data: name=Sunny Garden&flowers=tulips, daisies
  • https://example.com/search?q=tea%20%26%20cake as a whole URL: https://example.com/search?q=tea %26 cake. The %26 stays, so the & in the search term isn't mistaken for one between values.
  • https%3A%2F%2Fexample.com%2Fmenu as a URL component: https://example.com/menu, the way a link looks when it's carried inside another link
  • %F0%9F%8D%B0%20cake: 🍰 cake

Fixing errors

Errors name the characters that can't be decoded and where they start:

  • "Can't decode % at character 4: a percent sign has to be followed by two hexadecimal digits." comes from text such as 100%, where a percent sign stands for itself. Encoded, a percent sign is %25, so 100%25 decodes to 100%.
  • "Can't decode %E9 at character 4: these bytes aren't a UTF-8 character." comes from caf%E9, where é was encoded in Latin-1, an older encoding. In UTF-8 it's %C3%A9, and caf%C3%A9 decodes to café. A link cut off in the middle of a character, such as an emoji, gives this error too.

Good to know

  • If the result still has % codes in it, the text was encoded twice: fish%2520%2526%2520chips gives fish%20%26%20chips. Copy the result into the input to decode it once more, which gives fish & chips.
  • The wrong format doesn't give an error, just a slightly different result, such as plus signs left in place or %26 kept in a whole URL. If the result looks off, try another format.
  • To split a link into its protocol, host, path and query values, use the URL parser.