Uses JavaScript's encodeURIComponent / decodeURIComponent.
URL encoding, also known as percent-encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI) under certain circumstances. It's widely used in URLs to ensure that all characters are valid and can be correctly interpreted by web servers and browsers.
Only a limited set of characters (alphanumeric and a few special symbols like '-', '_', '.', '~') are considered "safe" to use directly in URLs. Other characters, such as spaces, question marks, ampersands, and non-ASCII characters, must be encoded. This is typically done by replacing the character with a '%' symbol followed by its two-digit hexadecimal representation.
- Encoder: Converts unsafe characters in a string into their percent-encoded equivalents.
- Decoder: Converts percent-encoded sequences back into their original characters.
This tool is useful for web developers, testers, and anyone working with URLs or query parameters.