Processed entirely in your browser. Your input is not uploaded.

URL Encoder / Decoder

Percent-encode and decode URLs and URI query parameters according to RFC 3986 standards.

Last updated October 5, 2026

Loading tool workspace…

Overview

Percent-encodes and decodes URLs and query values so characters that are special in a URL (&, =, ?, spaces, non-ASCII) are transmitted safely. You can encode a single query value or a whole URL.

Useful when building query strings or debugging a request that broke on a special character.

How it works

Encoding replaces unsafe characters with a % followed by their hex byte value. The tool offers two modes matching JavaScript's built-ins: component mode (encodeURIComponent) escapes everything that isn't an unreserved character, including & = ? : and /, which is right for individual parameter values; full-URL mode (encodeURI) leaves the structural characters intact and escapes only the rest.

Decoding reverses the process and reports a clear error on a malformed % sequence.

How to use the URL Encoder / Decoder

1

Select Mode

Switch between Encode or Decode.

2

Enter URL or String

Input full URL or query parameters.

3

Copy Result

Grab the clean escaped string.

When to use it

  • Encoding a search term or parameter value with spaces or symbols.
  • Building a redirect URL to pass as a query parameter.
  • Debugging a link that stopped working because of an unescaped character.

Examples

Component value

Input
hello world&foo=bar
Output
hello%20world%26foo%3Dbar

encodeURIComponent escapes the space, &, and = so the value can't be mistaken for extra parameters.

Whole URL

Input
https://example.com/search?q=hello world
Output
https://example.com/search?q=hello%20world

encodeURI leaves : / ? = alone and only escapes the space.

Key Features & Accuracy

Component vs Full URI

Toggle between encoding query values (encodeURIComponent) and full URLs (encodeURI).

Error Guard

Handles malformed percent-sequences gracefully without breaking the UI.

Limitations & important notes

This is percent-encoding for URLs, not the same as Base64 or HTML form encoding (which turns spaces into + instead of %20).
Decoding a string that was never validly percent-encoded raises an error rather than guessing.

Frequently Asked Questions

Use it for individual parameter keys and values, so characters like &, =, and spaces are escaped and can't break the query string.