HomeToolsdeveloperURL Encoder & Decoder
Last Updated: August 24, 2026Verified

Encode and Decode URLs — No Server Required

URL encoding (formally percent-encoding) is the process of converting characters that are unsafe in URLs into a safe, universally transmittable format. Cluster Tools's URL encoder/decoder handles this instantly in your browser — no data is sent anywhere.

Why URLs Need Encoding

URLs can only legally contain a specific subset of ASCII characters. Characters outside this set — spaces, accented letters, emoji, symbols like &, =, ?, and # — must be encoded before being included in a URL.

The encoding format: each unsafe byte is replaced with % followed by its two-digit hexadecimal value. A space (0x20) becomes %20. An ampersand (&, 0x26) becomes %26. The French character é (two bytes: 0xC3 0xA9 in UTF-8) becomes %C3%A9.

When You Need URL Encoding

Query parameter values — if you're building a URL like https://example.com/search?q=hello world, the space in the search term must be encoded: ?q=hello%20world. Without encoding, the URL is technically malformed and may be interpreted differently by different servers.

Path segments — URLs like /files/my document.pdf need the space encoded: /files/my%20document.pdf.

Passing URLs as parameter values — if you're passing a URL inside another URL (e.g., a redirect parameter), the inner URL must be fully encoded so the outer URL parser doesn't misinterpret its delimiters: ?redirect=https%3A%2F%2Fexample.com%2Fpath.

API construction — when programmatically building API request URLs, encoding the parameter values ensures special characters don't break the query string parsing.

Debugging API responses — percent-encoded strings in API responses, error messages, or logs often need decoding to read them as human text.

Encode vs. Encode URI Component

There are two levels of URL encoding:

  • encodeURIComponent (what most people need) — encodes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ). Suitable for encoding individual query parameter names and values.
  • encodeURI — also preserves URL structural characters like :, /, ?, #, &, =. Suitable for encoding a full URL without breaking its structure.

Cluster Tools offers both modes.

Step-by-Step: How to Use

Encoding:

  1. Paste the text, query string value, or full URL into the input.
  2. Select your encoding mode (full URL or component).
  3. The encoded output appears instantly. Copy it.

Decoding:

  1. Paste a percent-encoded string into the input.
  2. Click "Decode" — all %XX sequences are replaced with their original characters.

Common Encoded Characters Reference

| Original | Encoded | |---|---| | Space | %20 or + in form data | | & | %26 | | = | %3D | | ? | %3F | | # | %23 | | / | %2F | | + | %2B | | @ | %40 | | : | %3A |

Frequently Asked Questions

What's the difference between %20 and + for spaces? Both represent spaces, but in different contexts. %20 is the correct percent-encoding for a space anywhere in a URL. + represents a space only within the query string of an HTML form submission (application/x-www-form-urlencoded format). In modern APIs and URLs, %20 is preferred.

Why does my URL look different after encoding a URL versus encoding a component? When encoding a full URL (encodeURI), characters like /, ?, #, and : are preserved because they're structural URL characters. When encoding a component (encodeURIComponent), these are encoded too, because a component value shouldn't contain raw structural characters.

Can I decode a partially-encoded URL? Yes — the decoder processes all %XX sequences it finds in the input, leaving already-decoded characters unchanged.

Related Tools