URL encoding — formally called percent-encoding — is one of those foundational web concepts that causes recurring confusion precisely because it is usually invisible. When you paste a URL with spaces into a browser, it works. When you type a search query with special characters, the browser handles encoding automatically. But the moment you are constructing URLs programmatically, passing JSON as a query parameter, debugging a webhook that arrived with garbled parameters, or building an API integration where the callback URL itself must be embedded in another URL, you need to deal with percent-encoding manually. The Utility Spark URL Converter handles both directions: encode a raw string to its percent-encoded equivalent where every character that is not URL-safe is replaced by %XX hexadecimal pairs, or decode a percent-encoded string back to its readable form. It also correctly handles the difference between encoding a full URL (where / and ? and # should not be encoded) versus encoding a component like a query parameter value (where all special characters must be encoded). Everything runs in your browser using JavaScript's built-in encodeURI(), encodeURIComponent(), decodeURI(), and decodeURIComponent() functions.
lightbulb When to use this tool
- check_circle Encoding a complex string (JSON object, email address, search query with symbols) to safely embed it as a URL query parameter value.
- check_circle Decoding a percent-encoded URL received in a webhook, log entry, or API callback to read its actual content.
- check_circle Encoding a full callback URL that must be passed as a parameter inside another URL (double-encoding scenario).
- check_circle Debugging analytics tracking URLs with UTM parameters where the values contain special characters.
- check_circle Preparing a URL for use in an HTTP request header or Authorization value where special characters are not allowed unescaped.
Why use our tool?
Two Encoding Modes — Full URL vs Component
encodeURI() encodes a full URL, leaving structural characters like /, ?, #, &, = intact because they have structural meaning in URLs. encodeURIComponent() encodes an individual component (a query parameter value, a path segment), escaping all special characters including /, ?, #, and &. Using the wrong mode is a common source of bugs — this tool offers both with clear labels explaining when each applies.
Both Directions — Encode and Decode
Toggle between encoding (raw text → percent-encoded) and decoding (percent-encoded → readable text). Decoding uses decodeURI() for full URLs or decodeURIComponent() for individual component values. Both modes handle Unicode characters including Devanagari, Arabic, Chinese, and other non-ASCII scripts by encoding them to their UTF-8 byte sequences.
Handles Unicode — Including Indian Language Scripts
URLs can contain any Unicode character, but they must be percent-encoded for safe HTTP transmission. Hindi words, Tamil text, Arabic characters — all are encoded to their UTF-8 byte sequences when percent-encoded. The tool correctly handles multi-byte characters so encoded Unicode URLs decode back to their original scripts without data loss.
One-Click Copy
Copy the encoded or decoded output in one click. No selecting text, no dragging. The result is immediately ready for pasting into your code editor, browser address bar, API tool, or terminal.
Browser-Native — Zero External Dependencies
URL encoding and decoding uses JavaScript's built-in encodeURI/decodeURI and encodeURIComponent/decodeURIComponent functions. These are part of the JavaScript specification and execute locally in your browser. No external library, no server call.
How it works
Select the mode: 'Encode URL Component' for query parameter values and path segments, 'Encode Full URL' for complete URL strings.
Select the direction: 'Encode' (raw → percent-encoded) or 'Decode' (percent-encoded → raw).
Paste your input string into the text area.
The encoded or decoded result appears instantly in the output area.
Click 'Copy' to copy the result.
Examples
science Encoding a JSON Query Parameter
Use case: Passing a JSON filter object as a URL query parameter
Raw input: {"status":"active","date":"2024-07-28"}
Mode: Encode URL Component
Encoded output: %7B%22status%22%3A%22active%22%2C%22date%22%3A%222024-07-28%22%7D
Usage: /api/orders?filter=%7B%22status%22%3A%22active%22%2C%22date%22...
science Decoding a Webhook Callback URL
Received in log: callback_url=https%3A%2F%2Fmyapp.com%2Fwebook%3Ftoken%3Dabc123
Mode: Decode URL Component
Decoded: https://myapp.com/webhook?token=abc123
Now readable for debugging or configuration