Util Tools logo Util Tools
Developer Tools

Free URL Encoder & Decoder Online

Percent-encode or decode URLs and query strings as you type. Switch between full-URL and component encoding, with changed characters highlighted.

  • 100% free
  • No signup
  • Runs in your browser
Highlighted changes
Guide

What is URL encoding?

URLs may only contain a limited set of characters. URL encoding (percent-encoding) replaces unsafe or reserved characters with a "%" followed by their hexadecimal byte value, so a space becomes %20 and an ampersand becomes %26. This keeps the URL valid and unambiguous. The tool encodes and decodes as you type, highlighting which characters changed.

When do you need it?

Any time you put arbitrary text into a URL, typically a query-string value: search terms, email addresses, file names with spaces, or data passed between pages. Without encoding, characters like &, ?, =, #, and spaces would break the URL's structure or be misread as delimiters. Encoding ensures the value arrives intact.

encodeURI vs. encodeURIComponent

JavaScript offers two functions, and choosing wrong is a common bug. encodeURIComponent encodes a single piece of a URL (one query value), escaping the delimiters like & and = so they are treated as data. encodeURI encodes a whole URL and deliberately leaves those delimiters intact so the URL still works. The tool's full-URL and component modes mirror this distinction.

URL encoding is not Base64 or encryption

URL encoding only makes text safe to place in a URL; it provides no security and is trivially reversible. It is also distinct from Base64, which is a separate text-safe binary encoding. One historical quirk worth knowing: in query strings a space can be encoded as either %20 or +, and good decoders (including this one) handle both.

Last updated: July 2026

Frequently Asked Questions

What is URL encoding?
URL encoding (percent-encoding) converts characters that are not allowed in URLs into a format that can be transmitted. For example, spaces become %20.
When do I need to URL encode?
Always encode query string values before appending them to a URL to prevent injection and ensure proper parsing.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL and preserves characters like /, ?, &. encodeURIComponent encodes individual components and also encodes those characters.
Is URL encoding the same as Base64?
No. URL encoding uses % followed by hex codes. Base64 is a completely different binary-to-text encoding scheme.
Does URL decoding handle %20 and + for spaces?
%20 is the standard URL encoding for space. The + character represents a space only in HTML form data (application/x-www-form-urlencoded), not in general URLs.