Encode URLs, web addresses, query strings, and parameter values instantly with our free online URL encoder. When creating web links, transmitting form data, or consuming REST APIs, characters such as spaces, quotes, ampersands, slashes, and non-ASCII glyphs can break URL syntax or lead to parsing errors on web servers. This tool applies RFC 3986 percent-encoding to transform reserved and special characters into safe hexadecimal byte representations.
Whether you are a developer testing API endpoints, a digital marketer formatting tracking UTM tags, or a system architect escaping special characters in authorization headers, our URL encoder handles both individual URI components and full website addresses. If you need to revert encoded strings back to human-readable text, visit our companion URL Decoder.
All percent-encoding is processed 100% locally in your browser using modern Web APIs. Sensitive tokens, passwords, database query strings, and private API keys are never uploaded to any remote server or stored in cookies, ensuring complete client-side confidentiality.
When parameter values contain symbols like spaces, slashes, ampersands, or hashes, passing them raw confuses the web server because those symbols serve as URL structural delimiters. Percent-encoding replaces each character with a percent symbol (%) followed by its hexadecimal UTF-8 byte value.
Input (raw query string / URL):
https://example.com/search?query=hello world & fast=true#tagOutput (Component Encoding - encodeURIComponent):
https%3A%2F%2Fexample.com%2Fsearch%3Fquery%3Dhello%20world%20%26%20fast%3Dtrue%23tagOutput (Full URL Encoding - encodeURI):
https://example.com/search?query=hello%20world%20&%20fast=true#tag Notice how component encoding escapes delimiters like /, ?, =, and & so the entire string can safely be passed as a single query parameter value, whereas full URL encoding preserves URL structure and only encodes spaces and unsafe characters.
%20 (RFC 3986) or as a plus sign + (application/x-www-form-urlencoded). .txt file. encodeURIComponent for query values and encodeURI for complete web addresses.%20 and classic HTML form plus signs (+).&), equals signs (=), or question marks (?) inside GET requests without breaking parameter parsing. redirect_uri=https%3A%2F%2Fmyapp.com%2Fcallback). A Uniform Resource Identifier (URI) is composed of a restricted range of characters defined by RFC 3986. Because URLs were originally conceived to be transmitted over diverse legacy networks and physical protocols, characters allowed in a URL are strictly categorized into unreserved characters and reserved characters.
Unreserved characters are guaranteed to have no structural meaning in any URL scheme. These include uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), hyphens (-), underscores (_), periods (.), and tildes (~). These characters never require encoding.
Reserved characters serve as structural delimiters within URLs. These include characters such as :, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, and =. When any of these characters are part of the actual data content rather than acting as a separator (for example, if a user searches for the term "C&A"), they must be percent-encoded. If left unencoded, the web server or browser interprets the ampersand as the start of a new query parameter rather than data.
Percent-encoding mechanism: To percent-encode a character, it is first converted into its sequence of bytes using the UTF-8 character encoding. Each resulting byte is represented as a three-character sequence consisting of the percent symbol (%) followed by two hexadecimal digits denoting the byte value. For instance, the ASCII character & has a byte value of hexadecimal 26, which becomes %26. Multi-byte characters, such as the euro sign (€), translate to three UTF-8 bytes: %E2%82%AC.
Component Encoding vs. Full URL Encoding: In JavaScript and web standards, encodeURI is designed to encode an entire valid URL; it leaves reserved delimiters like http://, ?, and & intact so the URL remains navigable. Conversely, encodeURIComponent encodes all reserved delimiters as well, making it the correct method whenever you are building values to append onto a query string.
%2520 (the percent sign % being re-encoded as %25). Always encode the raw string only once, or decode before re-encoding. company=Ben & Jerry) and you encode it with Full URL mode, the ampersand is not escaped, causing the server to parse Jerry as an unintended second parameter. Use Component Mode for parameter values. & in a URL query string does not encode it for the web server; it creates literal entity text. Use URL percent-encoding (%26) in URLs and HTML entities (&) only inside HTML body markup. + represents a space in form query parameters, in path segments (like /user/john+doe) it represents a literal plus character. If your backend interprets + literally, stick to standard %20. Explore these companion utilities built to streamline web development, data formatting, and SEO:
<, >, and & for safe HTML rendering.