Skip to main content
Toolgin57 tools

URL Encode / Decode

Loading…

About URL Encode / Decode

The URL Encoder / Decoder converts special characters to percent-encoded sequences (%xx) or decodes them back to readable text. Essential for working with query strings, form data, API parameters, and URL path segments.

Characters like spaces, &, =, +, ?, #, and non-ASCII characters must be percent-encoded to be safely included in URLs. This tool handles both full URL encoding (preserving URL structure characters) and component encoding (encoding everything including /, ?, and &).

Everything runs in your browser. Your data never leaves your device.

How to Use URL Encode / Decode

  1. Paste your URL or text string.

  2. Select Encode or Decode.

  3. Choose Full URL mode (preserves /, ?, &, =) or Component mode (encodes everything).

  4. Copy the result.

Examples

Example — Encode URL with spaces
Input
https://example.com/search?q=hello world&lang=en
Output
https://example.com/search?q=hello%20world&lang=en
Example — Decode percent-encoded string
Input
Hello%20World%21%20How%27s%20it%20going%3F
Output
Hello World! How's it going?

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL, preserving structural characters like /, ?, &, and =. encodeURIComponent encodes individual parameter values, also encoding those structural characters.

Why is a space encoded as %20 in some cases and + in others?

%20 is the standard percent-encoding for a space in URLs. The + encoding for spaces is specific to HTML form data (application/x-www-form-urlencoded) and should not be used in URL paths.

Which characters get percent-encoded?

Any character outside the unreserved set (letters, digits, -, _, ., ~) gets encoded. In component mode, structural URL characters (/, ?, &, =, #, :) are also encoded.

Can I decode a URL with multiple percent-encoded characters?

Yes — the decoder handles any number of %xx sequences in a single pass, including sequences like %20, %2F, %3D, %26, etc.

How do I encode a URL query parameter value?

Use Component mode (encodeURIComponent equivalent) to encode the value. This encodes characters like &, =, and + that would otherwise break the query string structure.