URL Encoder & Decoder – Free Online Tool | Awesome Toolkit

URL Encoder / Decoder

Encode and decode URL components and full URLs. Supports both encodeURI and encodeURIComponent modes.

By Marshkalk

Direction
Mode

How to use the URL Encoder / Decoder

  1. Choose Encode or Decode and select the mode.
  2. Paste your text or URL into the left panel and click Encode / Decode.
  3. Click Copy to copy the result to your clipboard.

What is percent-encoding?

URLs can only contain a limited set of ASCII characters. Any character outside that set, accented letters, spaces, symbols, must be encoded as a percent sign followed by two hexadecimal digits: a space becomes %20, an é becomes %C3%A9, and a @ becomes %40. This is called percent-encoding or URL encoding.

encodeURIComponent vs encodeURI

encodeURIComponent encodes everything except unreserved characters (A-Z a-z 0-9 - _ . !). Use it for individual values that will be placed inside a URL, query string parameters, path segments, fragment identifiers. It encodes &, =, +, /, ?, and #, which would otherwise be interpreted as URL delimiters.

encodeURI leaves structural characters intact (: / ? # [ ] @ ! $ & ' ( ) * + , ; =). Use it for a complete URL that is already well-formed and you only need to handle non-ASCII characters or spaces.

When to encode manually?

  • Building query strings: always encode parameter values before appending them: ?q=encodeURIComponent(userInput)
  • Embedding URLs in other URLs: a URL inside a query parameter must be fully encoded
  • Non-ASCII paths: international domain names and paths with accented characters must be encoded
  • Decoding API responses: percent-decode URLs you receive from APIs or server logs before displaying them

Common encoded characters

CharacterEncodedCharacterEncoded
Space%20&%26
+%2B=%3D
/%2F?%3F
#%23@%40