← Tools
Encoding

URL Encoder / Decoder

Percent-encode URLs and URI components, or decode them back. Runs entirely in your browser.

Plain Text0 chars
Encoded URL0 chars

About URL Encoding

URL encoding converts characters unsafe in URLs into % followed by two hex digits. A space becomes %20, & becomes %26. Defined in RFC 3986. Read more: URL Encoding: When and How to Use It.

URI Component — use for query param values and path segments. Full URI — preserves structural characters like / ? # :, use for complete URLs. To parse query strings into JSON, try the Query Params to JSON tool.

Common Use Cases

  • Query parameters — encode values before appending to URLs
  • API requests — ensure data is safe in request URLs
  • Form submissions — browsers encode form data automatically
  • File names in URLs — handle spaces and special chars
  • Internationalisation — encode non-ASCII characters

Common Encoded Chars

  • %20 — space
  • %2B — plus +
  • %2F — slash /
  • %3F — question mark ?
  • %26 — ampersand &
  • %3D — equals =
  • %23 — hash #

Frequently Asked Questions

encodeURI vs encodeURIComponent?

encodeURIComponent encodes everything except letters, digits, and -_.!~*'(). Use it for values. encodeURI preserves URL structure chars like :/?#. Use it for full URLs.

Why does space sometimes become + instead of %20?

In HTML form encoding (application/x-www-form-urlencoded) spaces become +. In standard percent-encoding they become %20. Most APIs prefer %20.

Does this handle Unicode?

Yes. Non-ASCII characters are UTF-8 encoded first, then each byte is percent-encoded. For example becomes %E2%82%AC.

What is double-encoding?

Encoding an already-encoded string turns %20 into %2520. Decode first if you are unsure whether the input is already encoded.