URL Encoder / Decoder
Usage Guide
URL Encoder / Decoder is an online tool for percent-encoding and decoding URL components without leaving your browser. URLs can only contain a limited set of ASCII characters; all other characters — spaces, Unicode text, punctuation, and special symbols — must be percent-encoded as a % followed by their two-digit hexadecimal code point. Getting this encoding right is critical: a misencoded URL might fail silently, redirect to the wrong resource, or expose a security vulnerability. This tool supports two encoding standards: encodeURIComponent (which encodes everything except unreserved characters — the standard for encoding query parameter values and path segments) and encodeURI (which leaves characters with special meaning in a full URL, such as /, :, ?, and &, unencoded). The decoder handles both variants as well as malformed or partially encoded strings. You can paste an entire URL to analyse and decode its components — scheme, host, path, query parameters, and fragment — or encode individual values before assembling them into a URL. Developers working with OAuth callback URLs, complex query strings, API endpoints with non-ASCII parameters, or internationalized domain names will find this tool especially useful.
- Choose encode or decode — Select "Encode" to convert a plain string into a percent-encoded URL component, or "Decode" to convert a percent-encoded string back to its original readable form.
- Select the encoding mode — Choose "encodeURIComponent" to encode all characters except letters, digits, and - _ . ~ (appropriate for encoding individual query values or path segments), or "encodeURI" to encode only characters not allowed in a complete URL (appropriate for encoding a full URL while preserving its structure).
- Paste your input — Type or paste the text you want to encode or decode into the input panel. The output updates instantly as you type.
- Review the output — Check the right panel for the encoded or decoded result. Spaces become %20 (or + in form encoding), Unicode characters become their UTF-8 byte sequences in percent notation, and reserved characters are handled according to the selected mode.
- Decode a full URL — Paste a complete URL in Decode mode to make every percent-encoded sequence human-readable. This is useful for debugging redirect chains, OAuth callback parameters, and API error responses.
- Copy the result — Click "Copy" to copy the encoded or decoded output directly to your clipboard, ready to paste into your application code, browser address bar, or API client.
Frequently Asked Questions
What is URL encoding?
URL encoding (percent-encoding) converts characters that are not allowed in URLs into a % followed by two hexadecimal digits. For example, a space becomes %20. This ensures the URL remains valid across all systems.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a complete URL and leaves characters like /, ?, =, & intact because they have structural meaning in a URL. encodeURIComponent encodes a URL component such as a query parameter value — it also escapes /, ?, =, & so the value does not break the URL structure.
Is my URL data processed on a server?
No. All encoding and decoding runs entirely in your browser using the native JavaScript encodeURI / decodeURI / encodeURIComponent / decodeURIComponent functions. Nothing is sent to any server.
Can I use this tool offline?
2Kit is a Progressive Web App (PWA). After your first visit it works fully offline.
Why do some characters like + appear in encoded URLs?
The + character is an older convention (used in HTML form encoding) that represents a space in query strings. Modern percent-encoding represents a space as %20. This tool uses the standard percent-encoding approach (encodeURIComponent encodes + as %2B).
Technical Implementation
All processing runs entirely in your browser — no data is ever sent to any server. This tool works fully offline as a Progressive Web App (PWA): after the first visit, all pages and assets are cached by a Service Worker and remain available without an internet connection. Your input data never leaves your device, making it safe for sensitive content including API keys, passwords, private configuration, and confidential documents.