|
Developer Utilities 100% Client-Side · 0 Bytes Sent to Server Instant In-Memory Execution

URL Encoder & Decoder

Encode plain text into URL-encoded format (%20 percent-encoding) or decode URL strings safely for web API development and URL testing.

0 / 500,000 chars

Step-by-Step Instructions

1

Enter URL or Query String

Paste complete URLs, URI parameters, or special character text into the input field.

2

Select Encode or Decode Mode

Choose URL Encode to convert unsafe characters to percent-encoding, or URL Decode to restore plaintext.

3

Choose Encoding Standard

Select standard `encodeURIComponent` (encodes all special characters) or `encodeURI` (preserves protocol/path delimiters).

4

Copy Encoded String

Copy the sanitized URL-safe string ready for API requests and query parameters.

Key Features & Capabilities

  • RFC 3986 percent-encoding and decoding engine with complete UTF-8 multi-byte character support
  • `encodeURIComponent` vs `encodeURI` vs `escape` JavaScript function standard modes
  • Form URL-encoded (`application/x-www-form-urlencoded`) space encoding options (`%20` vs `+`)
  • Query string key-value pair parser breaking URL parameters into an interactive table

Frequently Asked Questions

What is URL Percent-Encoding (URL Encoding)?

URL encoding converts reserved, unprintable, or non-ASCII characters into percent-encoded format (`%XX`), where `XX` is the two-digit hexadecimal ASCII/UTF-8 byte value. For example: a space becomes `%20`, an ampersand (`&`) becomes `%26`, and an equals sign (`=`) becomes `%3D`, ensuring URIs remain valid across all HTTP network proxies.

What is the difference between encodeURI() and encodeURIComponent()?

`encodeURI()` is designed to encode a full URL while preserving reserved protocol and routing delimiters (`:`, `/`, `?`, `#`, `&`, `=`). `encodeURIComponent()` is designed to encode a *single parameter or query string value*, encoding reserved characters (e.g., converting `?` to `%3F` and `&` to `%26`) so they are not misinterpreted as URL query delimiters.

When should spaces be encoded as '%20' versus '+'?

In standard URI path and query strings (RFC 3986), spaces must be percent-encoded as **`%20`**. In HTML form submissions using `application/x-www-form-urlencoded` MIME type (e.g., query strings in traditional form GET/POST requests), spaces are encoded as **`+`**.

Why do non-ASCII characters generate multiple percent-encoded bytes?

Under UTF-8 encoding rules, non-ASCII characters (such as accented characters, Cyrillic, or emojis) require 2, 3, or 4 bytes of data. Each individual byte is percent-encoded separately: for example, the euro symbol `€` (3 bytes in UTF-8: `0xE2 0x82 0xAC`) becomes `%E2%82%AC`.

Discover complementary online tools in the same workflow.