Encode and decode URLs, query parameters, and special characters instantly. Supports full URL encoding, component encoding, Base64, and HTML entities.
Encodes all special characters — best for query parameter values
URL encoding, also known as percent-encoding, is a mechanism for converting special characters into a format that can be safely transmitted within a URL. Since URLs can only contain a limited set of ASCII characters, any character outside this set must be encoded using a percent sign (%) followed by its two-digit hexadecimal value.
For example, a space character becomes %20, an ampersand (&) becomes %26, and a plus sign (+) becomes %2B. This encoding ensures that special characters don't break the URL structure or get misinterpreted by web servers and browsers.
There are two main JavaScript functions for URL encoding: encodeURI() encodes a full URL while preserving characters that have special meaning (like :, /, ?, #), while encodeURIComponent() encodes individual URL components (like query parameter values) and converts ALL special characters.
Base64 encoding is a separate encoding scheme that converts binary data into ASCII text using a set of 64 characters (A-Z, a-z, 0-9, +, /). It's commonly used to embed data in URLs, encode email attachments, and store binary data in text-based formats like JSON and XML.
Proper URL encoding is essential for web development, API integrations, form submissions, and preventing security vulnerabilities like injection attacks.