X114

URL Percent-Encoder & Parameter Inspector

Percent-encode and decode URLs adhering to RFC 3986. Switch between encodeURI and encodeURIComponent, inspect query parameters, and handle UTF-8 characters.

URL Percent-Encoder & Parameter Inspector

Scope:
Real-World Scenario Presets
66 chars
https%3A%2F%2Fx114.org%2Fsearch%3Fq%3Dhello%20%E4%B8%96%E7%95%8C%26ref%3D%F0%9F%9A%80%26category%3Ddeveloper%20tools
Output: 116 charsExpansion: 75.8%

Detected Query Parameters (3)

q=hello 世界
ref=🚀
category=developer tools

About

Our URL Percent-Encoder & Parameter Inspector provides client-side encoding, decoding, and query string parameter extraction adhering strictly to RFC 3986 (Uniform Resource Identifier: Generic Syntax) and WHATWG URL standards. Every conversion executes 100% locally in your browser memory with zero server telemetry or network logging.


RFC 3986 URL Encoding Principles & Character Taxonomy

A Uniform Resource Identifier (URI) is mathematically constrained to a defined repertoire of ASCII characters. Any character outside this permitted range—including spaces, international CJK ideographs, accented characters, and emojis—must be converted into percent-encoded octets (%XX representing hex values).

RFC 3986 strictly classifies ASCII characters into two functional tiers:

  1. Unreserved Characters (Never Encoded): Digits (0-9), Letters (A-Z, a-z), Hyphen (-), Underscore (_), Period (.), Tilde (~).
  2. Reserved Characters (Delimiters): :, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, =.

Comparative Analysis: encodeURI vs encodeURIComponent vs escape

Feature / Standard encodeURI (Full URL Mode) encodeURIComponent (Component Mode) Legacy escape() (Deprecated)
Primary Purpose Sanitizing a complete URL without breaking structural separators Encoding individual query values, path segments, or nested callback URLs Obsolete 1990s JS function (Do NOT use)
Encodes Reserved Delimiters (:/?&=#) NO (Preserves structure) YES (Encodes : as %3A, / as %2F, & as %26) Partial / Inconsistent
Encodes ASCII Spaces Encodes as %20 Encodes as %20 Encodes as %20
UTF-8 Multi-byte Multilingual Support Fully compliant with RFC 3986 Fully compliant with RFC 3986 Broken: Outputs non-standard %uXXXX
Best Architectural Use Case Cleaning up user-entered links Setting OAuth redirect_uri, query params, webhooks Strictly forbidden in modern ECMAScript

The Classic Space Dilemma: %20 vs +

  • RFC 3986 Standard URI Path & Query: A space MUST be percent-encoded as %20. Universal standard for modern RESTful APIs.
  • HTML Form POST / application/x-www-form-urlencoded: In legacy HTML forms, spaces are encoded as plus signs (+). When decoding query parameters in backend routers, + must be converted back to spaces.

Developer Implementation Code Snippets

Node.js & TypeScript

export function buildTrackingUrl(baseUrl: string, params: Record<string, string>): string &#123;
  const url = new URL(baseUrl);
  for (const [key, value] of Object.entries(params)) &#123;
    url.searchParams.set(key, value);
  &#125;
  return url.toString();
&#125;

Python 3

from urllib.parse import quote, unquote, urlencode
encoded = quote("hello 世界 & friends", safe="")
decoded = unquote(encoded)

Go

package main
import "net/url"

func main() &#123;
	encoded := url.QueryEscape("https://x114.org/tools?q=hello world")
	path := url.PathEscape("user profile/photos")
&#125;

FAQ