URL Encoder / Decoder

Encode and decode URLs, query parameters, and path segments instantly

A URL encoder / decoder converts text to and from percent-encoded format required for safe transmission in URLs. Special characters like spaces, ampersands, and quotes must be encoded before they can appear in query strings, path segments, or other URL components. This tool also shows a character-by-character breakdown of exactly which characters were encoded and why.

How to Use the URL Encoder / Decoder

URL encoding ensures that special characters in URLs are transmitted safely over the internet. Without encoding, characters like spaces, ampersands, and equals signs would be misinterpreted by web servers and browsers. Our free URL encoder decoder handles all URL component types and shows exactly which characters require encoding.

Step 1: Choose Encode or Decode Mode

Select "Encode" to convert plain text into percent-encoded format, or "Decode" to convert a percent-encoded string back to readable text. The input label and placeholder update to match the selected mode.

Step 2: Select the Component Type

The encoding rules differ by URL component. Use "Query Parameter" when encoding a value that will appear after ?key= in a URL — this is the strictest encoding. Use "Full URL" to encode an entire URL while preserving its structural characters like ://, /, and ?. Use "Path Segment" or "Fragment" for those specific URL components.

Step 3: Paste and Convert

Paste or type your text and click Encode (or Decode). The result appears instantly with a character-by-character breakdown showing green for safe characters and red for encoded ones. This breakdown helps you understand exactly which characters required encoding and why.

Step 4: Swap and Copy

Use the Swap button to move the output back to the input for another pass of encoding or decoding. Use Copy to place the result on your clipboard, ready to paste into your code, API request, or browser address bar.

Common Use Cases

URL encoding is essential when building query strings in code, constructing redirect URLs, creating links with special characters in anchor text, encoding API parameters that contain spaces or symbols, and debugging malformed URLs that fail to load correctly.

Frequently Asked Questions

Is the URL encoder / decoder free?

Yes, completely free with no account required. All encoding and decoding happens in your browser using JavaScript's built-in functions — no data is sent to any server.

What is URL encoding (percent encoding)?

URL encoding (also called percent encoding) converts characters that are not allowed in URLs into a safe format using a percent sign followed by two hex digits. For example, a space becomes %20, and an ampersand becomes %26. This ensures URLs are transmitted correctly over the internet.

What is the difference between encoding a full URL vs. a query parameter?

A full URL preserves structural characters like :, /, ?, &, and = while encoding spaces and special characters in the path and query. A query parameter value must encode all special characters including & and = to prevent them from being interpreted as URL structure. Use 'Query Parameter' mode when encoding values that will appear inside a query string.

Why is the plus sign (+) sometimes used instead of %20 for spaces?

The plus sign (+) represents a space only in the query string of HTML form submissions (application/x-www-form-urlencoded format). In standard percent encoding, a space is %20. Our encoder uses %20 for spaces, which is correct for modern URL encoding (RFC 3986).

What characters are safe in URLs without encoding?

RFC 3986 defines unreserved characters that never need encoding: letters (A-Z, a-z), digits (0-9), and the four symbols hyphen (-), period (.), underscore (_), and tilde (~). All other characters should be percent-encoded when used outside their structural roles.

Can I decode a URL that has been encoded multiple times?

Yes, you can paste a double-encoded URL and decode it once to get the single-encoded version, then decode again to get the original text. Each click of the Decode button removes one layer of encoding.