Tools You'll Use Again
Search 521+ tools... Ctrl K
Guides 0
100% Private Client-Side Processing

URL Encoder & Decoder

Convert unsafe URL characters to percent-encoded hex codes (`%20`, `%26`, `%3D`), or restore encoded URLs back into readable text format.

Loading URL Encoder & Decoder...

What is the URL Encoder & Decoder?

This tool converts characters into percent-encoded ASCII representations (URL encoding) and restores encoded URL strings back into readable text according to RFC 3986.

What Goes In
Raw URLs, search query strings, form payloads, or percent-encoded (%20, %2F) URL strings.
What Comes Out
Encoded URL-safe string or decoded human-readable URL.

RFC 3986 Percent-Encoding and Character Sets

RFC 3986 divides the ASCII character space into unreserved characters (A–Z, a–z, 0–9, -, _, ., ~) and reserved characters (! * ' ( ) ; : @ & = + $ , / ? # [ ]). Reserved characters have structural meanings in URIs (like separating host from path or delimiting query pairs). When a reserved character is used as literal data rather than a delimiter, it must be percent-encoded: the byte value is converted to a two-digit hexadecimal number prefixed with % (e.g. space becomes %20, & becomes %26).

Full URL vs Component Encoding: encodeURI() retains structural characters (://?&=) while encoding spaces and non-ASCII. encodeURIComponent() encodes every character except unreserved ones, ensuring data values do not collide with URI syntax.
Spaces: %20 vs +: RFC 3986 specifies %20 for URI percent-encoding. The + symbol is used exclusively for application/x-www-form-urlencoded query strings (e.g. HTML form submissions).

How to Use the URL Encoder & Decoder

1

Choose Encode or Decode Mode

Select "Encode" to sanitize special characters for URLs, or "Decode" to read percent-encoded URLs.

2

Paste Your Text or URL

Enter your link or query string into the input field.

3

Choose Encoding Granularity

Select "Component" for query parameter values, or "Full URL" to preserve protocol and domain structure.

Key Settings & Parameters

Setting What It Controls Recommended Default
Encoding Mode Component mode (encodeURIComponent) encodes all delimiters; Full URL mode (encodeURI) leaves ://, ?, &, and = unencoded. Use Component for parameter values, Full URL for complete website addresses
Space Representation Switch between standard RFC 3986 %20 and form-style +. %20 for REST APIs and modern links

Common Pitfalls to Avoid

  • • Using encodeURI on query string values containing & or =
    encodeURI preserves & and =, meaning a search query like "cats & dogs" will break the query string into two parameters. Use Component mode for parameter values.
  • • Double-encoding already encoded URLs
    Encoding %20 a second time results in %2520 (where the % is encoded as %25), causing broken links.

Pro Tips for Best Results

  • When passing another URL inside a query parameter (e.g. redirect=https://example.com/page), always use Component encoding so the inner URL does not prematurely terminate the outer URL query string.

Local Processing Guarantee

Zero server uploads. Private query parameters, internal intranet links, and session tokens remain on your local machine.

Engine: Client-side RFC 3986 JavaScript encoding engine

When to Use

  • Encoding parameters passed into URL query strings (e.g. searching "coffee & tea" -> q=coffee%20%26%20tea).
  • Sanitizing UTM campaign tags and redirection parameters in marketing links.
  • Decoding long, messy tracking links to inspect original landing destinations.
When NOT to Use:

Encoding entire HTML documents or binary files (use Base64 for binary data).

Operational Boundaries & Limits:
  • • Supports up to standard URI length constraints. RFC 3986 defines no theoretical maximum, though common web servers (Apache, Nginx) enforce 8KB limits.

Frequently Asked Questions

encodeURI is designed for complete URLs; it leaves protocol slashes, colons, question marks, and ampersands intact. encodeURIComponent is designed for query parameter values; it encodes all delimiters (including &, =, and ?) so they do not break URL structure.

RFC 3986 URI standard specifies %20 as the canonical encoding for spaces. The plus sign (+) is defined by the legacy W3C HTML form specification (application/x-www-form-urlencoded) for query string keys and values.

%25 is the percent-encoded representation of the percent sign (%) itself. If you see "%2520", it means a space (%20) was accidentally double-encoded.

Related Tools You Might Need

Next logical workflows