ToolBox.Online

URL Encoder / Decoder — Encode & Decode URLs Online Free [2026]

Encode or decode URLs instantly online. Percent-encode special characters for safe web use or decode percent-encoded strings back to readable text. Free, no install.

What is URL Encoder / Decoder?

URL encoding (also called percent encoding) converts special characters in a URL into a format that can be safely transmitted over the internet. Characters like spaces, &, =, and # are replaced with a % sign followed by their hex code (e.g., space → %20). URL decoding reverses this process.

How to Use URL Encoder / Decoder

1. Paste your URL or text into the input box. 2. Click "Encode" to convert special characters to percent-encoded format, or "Decode" to reverse the process. 3. The result appears instantly — click "Copy" to copy it to your clipboard. Tip: Use "Encode" when building query strings or embedding URLs inside other URLs. Use "Decode" when reading logged URLs or debugging API requests.

How URL Encoder / Decoder Works

URL encoding uses JavaScript's built-in `encodeURIComponent()` function, which converts characters to their UTF-8 byte sequences and percent-encodes each byte. This is the standard method for encoding individual URL components (query values, path segments). Decoding uses `decodeURIComponent()` to reverse the process. Characters that are always safe in URLs (A-Z, a-z, 0-9, -, _, ., ~) are never encoded.

Common Use Cases

  • Encoding query parameters before appending them to a URL
  • Decoding percent-encoded URLs from server logs or API responses
  • Building and debugging API request URLs with special characters
  • Converting spaces and symbols in file names to URL-safe format
  • Understanding encoded URLs in browser address bars

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI() encodes a complete URL and preserves characters like /, ?, =, & that have structural meaning in URLs. encodeURIComponent() encodes an individual component (like a query parameter value) and encodes those structural characters too. For encoding query parameter values, always use encodeURIComponent.

Why does a space become %20 or +?

In standard percent encoding, a space is %20. In HTML form data (application/x-www-form-urlencoded), spaces are encoded as +. Both are valid depending on context. This tool uses %20 (RFC 3986 standard), which is correct for modern APIs and URLs.

Which characters need to be URL encoded?

All characters except A-Z, a-z, 0-9, and -_.~ must be percent-encoded in URL components. Common ones: space → %20, & → %26, = → %3D, + → %2B, / → %2F, ? → %3F, # → %23, @ → %40.

Can I encode a full URL or just a part?

You should only encode URL components (path segments, query values), not the full URL. Encoding the full URL would break the protocol prefix (https://), slashes, and other structural characters. If you need to embed a URL inside another URL as a parameter value, encode the inner URL first.

Is URL encoding the same as Base64?

No. URL encoding (percent encoding) converts individual characters to %XX hex codes for safe URL transmission. Base64 encodes binary data into ASCII text using 64 printable characters. They solve different problems — use URL encoding for URLs and Base64 for encoding binary content in text contexts.

Related Tools

Explore More Free Tools

Discover more tools from our network — all free, browser-based, and privacy-first.