Free tech learning for everyone, from basics to pro

URL encoder & decoder

Encode or decode URLs and query strings, and split a URL into its parts.

Runs on your device · nothing is uploaded

Why URLs need encoding

A URL can only contain a limited set of characters. Spaces, non-English letters and characters with special meaning (such as &, ?, # and /) must be written as % followed by two hex digits. A space becomes %20 (or + in form data).

  • Encode (component) encodes everything except letters, digits and - _ . ! ~ * ' ( ). Use it for a single query value.
  • Encode full URL keeps the characters that give a URL its structure, such as : / ? & #.

When you decode a full URL, the tool also splits it into scheme, host, port, path and each query parameter, which is handy when reading web, proxy or API logs.

Examples

CharacterEncoded
space%20 (or + in form data)
&%26
/%2F
?%3F
#%23
é%C3%A9 (its two UTF-8 bytes)

So a search for vlan trunk becomes ?q=vlan%20trunk. If the & in "R&D" were not encoded, the server would think a new parameter had started.

Why security teams care

  • Hidden attacks: encoding can hide malicious input from simple filters. %2e%2e%2f is ../, used in path traversal attacks. Web application firewalls decode input before checking it.
  • Double encoding: %252e decodes to %2e, and again to .. Applications should decode exactly once.
  • Phishing links: long encoded links can hide where they really go. Decoding them is a quick first check.

Quick question

What is the difference between "Encode (component)" and "Encode full URL"?

Use component encoding for one value inside a URL, such as a search term or file name. Use full-URL encoding only on a whole address, because it leaves :, /, ? and & alone so the structure still works.

Get free updates by email

New notes, tools, CCNA and Security+ tips and important security news from FM TecHub, explained simply. Free, about twice a month. Unsubscribe anytime; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesup

Free · no spam · past emails · powered by Buttondown