2026-08-07

What is URL encoding (percent-encoding)?

Learn how percent-encoding keeps query strings and path segments safe - then encode and decode URLs privately in your browser.

URL encoding (also called percent-encoding) replaces unsafe or reserved characters with a % followed by two hex digits. It lets spaces, ampersands, Unicode, and other characters travel safely inside query strings and path segments without breaking the URL's structure.

What percent-encoding looks like

The value hello world & more encodes as a component to:

hello%20world%20%26%20more

Placed in a query, that becomes ?q=hello%20world%20%26%20more. The encoded %26 is a literal ampersand inside the value - not a separator between parameters.

encodeURIComponent vs encodeURI

In JavaScript, encodeURIComponent escapes almost everything that is not an unreserved character. That is the right default for query values and path segments. encodeURI leaves characters like :, /, ?, and & intact because it targets a whole URL. Jigglify's URL tool uses component-style encoding similar to encodeURIComponent.

When developers encode URLs

  • Building search, filter, and redirect query parameters from user input
  • Embedding dynamic path segments that may contain spaces or punctuation
  • Debugging logs where values appear percent-encoded
  • Preparing values for APIs that expect application/x-www-form-urlencoded style text

URL encoding vs Base64

URL encoding keeps text safe inside a URI. Base64 represents arbitrary bytes as ASCII for channels that are not URLs. Use the URL tool for query and path values, and the Base64 tool for binary-safe payloads.

Encode or decode URL components in your browser - nothing is uploaded.
Open the free URL tool →

Next reads: How to encode and decode URLs · URL encoding common mistakes