~/tools/url-encoder
URL Encoder / Decoder
Encode and decode URLs using percent-encoding instantly — and parse query strings into a readable table. Runs entirely in your browser.
What is URL Encoding?
URL encoding (also called percent-encoding) is a mechanism for encoding special characters in a URL so they can be safely transmitted over the internet. URLs can only contain a limited set of characters — letters, digits, and a few symbols like - _ . ~. Any other character must be represented using a percent sign followed by two hexadecimal digits representing the character's ASCII code.
For example, a space becomes %20, a & becomes %26, and = becomes %3D. This encoding is defined in RFC 3986.
encodeURI vs encodeURIComponent
JavaScript provides two encoding functions with different scopes. This tool uses encodeURIComponent, which is the safer choice for encoding individual values within a URL.
Common Use Cases
API Query Parameters
Safely encode user search inputs before appending to API request URLs
OAuth Redirect URIs
Encode redirect_uri values in OAuth 2.0 authorization requests
Form Submission
HTML forms use percent-encoding to transmit field values in GET requests
Deep Links
Encode full URLs embedded inside other URLs (e.g., return_to parameters)
Debugging API Calls
Decode encoded URLs from server logs or network inspector to inspect values
Korean / CJK Text in URLs
Non-ASCII characters like Korean, Chinese, or Arabic are always percent-encoded