RubanTools

URL Encoder & Decoder

Encode special characters in URLs using percent-encoding (RFC 3986) or decode URL-encoded strings back to plain text.

Quick Examples

URL Encoding Cheat Sheet

CharacterEncodedNotes
Space%20Also written as + in query strings
!%21
#%23Hash / anchor
$%24
&%26Query string separator
'%27Single quote
+%2BPlus sign (+ means space in query)
/%2FPath separator - safe in encodeURI
:%3AColon - safe in encodeURI
=%3DQuery param assignment
?%3FQuery string start - safe in encodeURI
@%40Safe in encodeURI

URL Encode and Decode

URL encoding, formally called percent-encoding, is a mechanism defined in RFC 3986 (published in 2005) that converts characters not permitted in a URL into a safe format using a percent sign followed by two hexadecimal digits. For example, a space becomes %20 and the rupee symbol (Rs.) becomes %E2%82%B9. Without this encoding, browsers and servers cannot reliably transmit URLs containing special characters, query strings with Indian language parameters, or file paths with spaces.

Common Use Cases for Indian Developers

Indian web developers frequently encounter URL encoding when building APIs for Aadhaar-linked services, UPI payment gateways, or government e-commerce portals. Search queries in Hindi, Tamil, or Bengali must be encoded before being appended to a URL. Tools like this are also used to decode webhook payloads from payment providers such as Razorpay, Paytm, and PhonePe that transmit data in percent-encoded form. Backend developers preparing for technical interviews at Indian IT firms are often tested on this concept.

Encoding vs Decoding

Encoding converts a raw string to its URL-safe representation, while decoding reverses the process. This tool handles both directions and also identifies which characters are being changed, making it useful for debugging broken links, fixing malformed query parameters, or preparing data for REST API calls in frameworks like Laravel or Node.js commonly used in Indian startup tech stacks.

URL Encoding Questions

URL encoding (percent-encoding, RFC 3986) converts special characters in a URL into a format safe for HTTP transmission. For example, a space becomes %20 and non-ASCII characters like Hindi letters are converted to multi-byte %XX sequences. Use it when passing user input as URL query parameters or constructing URLs dynamically in code.

encodeURI() encodes a complete URL, leaving characters like /, :, ?, &, and # unencoded. encodeURIComponent() encodes a URL component (like a query parameter value), also encoding /, :, ?, and &. Use encodeURIComponent for individual query values; encodeURI for a full URL.

A space is encoded as %20 in standard percent-encoding (RFC 3986). In HTML form submissions, spaces may also be encoded as + (plus sign). When decoding query strings, both %20 and + may represent a space depending on the context. Our tool uses %20 (standard).

Non-ASCII characters like Devanagari (Hindi) or Tamil are first converted to UTF-8 bytes, then each byte is percent-encoded. For example, the Hindi character 'न' (U+0928) becomes %E0%A4%A8 in a URL. Use our tool's encodeURIComponent mode to correctly encode any Indian language text for URLs or API requests.

URL encoding converts characters to %XX format for safe use in URLs and HTTP requests. HTML encoding converts characters to HTML entities (&, <, etc.) for safe display in HTML pages. They serve different purposes and should not be used interchangeably.