URL Encoder & Decoder

Encode query values, encode a full URL, or decode percent-encoded text. Use component mode for parameter values, full URL mode for URL structure, and plus-space mode for form-style spaces.

How to Encode or Decode a URL

  1. Choose mode — Select Encode Component for query parameters, Encode Full URL to preserve URL structure, or Decode to reverse encoding.
  2. Enter your text or URL — Paste the string you want to encode or decode into the input area.
  3. Click Convert — Copy the output or use Swap to move the output back to input for chaining.

How It Works: RFC 3986 Percent-Encoding & URI Octet Escaping

What is URL Percent-Encoding?

URL percent-encoding is a character substitution mechanism defined by RFC 3986 percent-encoding standards that converts non-ASCII characters, whitespace, and reserved delimiters in Uniform Resource Identifiers (URIs) into hexadecimal triplets of the form %XX. It guarantees that query parameters, path components, and headers conform to universal internet addressing standards.

How It Works in the Browser

AnyConverter handles URI normalization locally using standards-compliant JavaScript encoding functions and UTF-8 octet serialization:

  1. Codepoint to UTF-8 Conversion: Input characters are converted into their variable-length UTF-8 byte sequences (1 to 4 bytes per character).
  2. Reserved vs. Unreserved Characters Evaluation: Characters are classified into reserved vs. unreserved characters according to RFC 3986. The unreserved set—letters (A-Z, a-z), digits (0-9), hyphen (-), underscore (_), period (.), and tilde (~)—remains unescaped.
  3. Hex Triplet Substitution: All reserved characters and non-ASCII bytes are replaced with a percent sign (%) followed by two uppercase hexadecimal digits representing the byte value.
  4. Component vs Full URI Differentiation: Path delimiters like slashes and query delimiters like ampersands can be preserved or escaped based on whether full URI or query parameter encoding is selected.

Key Specifications & Reserved Character Rules

The tool strictly observes RFC 3986 percent-encoding specifications and the WHATWG URL standard. It rigorously distinguishes reserved vs. unreserved characters, differentiating between encodeURIComponent() (which escapes reserved delimiters like /, ?, &, = for query parameters) and encodeURI() (which preserves protocol and path delimiters for full web addresses). All decoding reconstructs original UTF-8 strings entirely within your browser.

Features

URL encoder for components and full URLs

Use URL Encoder to prepare query parameter values, encode a full URL while preserving its structure, or decode percent-encoded text back into readable form.

Example workflow

For the next step, try JSON Formatter & Validator, Regex Tester & Log Extractor, Base64 Encoder & Decoder, Hash Generator.

Frequently Asked Questions

What is URL encoding? +
URL encoding turns characters into percent-encoded sequences so they can be used safely in URL components, query values, or full URLs.
When should I use Encode Component vs Encode Full URL? +
Use Encode Component for a single parameter value because it encodes separators like / and ?. Use Encode Full URL when you want to keep URL separators intact.
What does plus-space mode do? +
Plus-space mode writes spaces as + during encoding, which is useful for form-style query strings. Decode mode also treats plus signs as spaces.
Can decoding fail? +
Yes. Decode mode can show an error when the input contains malformed or incomplete percent escapes.
Does Full URL mode encode everything? +
No. Full URL mode preserves URL syntax characters, while Component mode encodes more characters for parameter values.