URL Encoder / Decoder
Securely encode and decode URL parameters. Processing is completely contained within the browser.
πView percent-encoding specifications and notes
What is URL Encoding (Percent-Encoding)?
URLs have strict rules (RFC 3986) allowing only alphabets, numbers, and certain symbols (-, ., _, ~, etc.).
To transmit multi-byte characters like Japanese or 'reserved characters' used for URL control as URL data, they must be converted into safe strings using % and hexadecimal numbers.
'Reserved Characters' prone to causing errors
The following symbols have special meanings in URLs and must always be encoded when sent as parameter values.
- β’
?: Indicates the start of a query string (parameters). - β’
&: Serves to separate multiple parameters. - β’
=: Binds a parameter's key and value. - β’
#: Points to a specific location (fragment) within a page. - β’
/: Separates path hierarchies.
Is a space %20 or +?
A highly confusing point in practice. The encoding result for a space differs depending on the specification.
- β’
%20(RFC 3986): The standard URI specification. Recommended for URL paths and general API requests. - β’
+(application/x-www-form-urlencoded): An older specification used when making POST requests from HTML forms (<form>). Even today, some web systems or standard language functions may convert spaces to +.
Differentiating functions in JavaScript
When encoding in JavaScript, you must choose between two functions according to your needs.
- β’
encodeURI()UrlEncodeDecode.encodeURI - β’
encodeURIComponent()UrlEncodeDecode.encodeURIComponent
Input (Text)
Output (Encoded String)
About Security
All processing is performed within your browser. Input data is never sent to external servers. Use with peace of mind.