Free URL Encoder Online
Percent-encode URLs and query string components in your browser instantly.
Input
Output encodeURIComponent
URL Encoding Examples
Spaces become %20, & becomes %26, = becomes %3D, and so on. The two modes differ in which characters they preserve:
encodeURIComponent (Component mode)
Input:
Output (Component mode — encodes : / ? & =):
Output (Full URL mode — preserves URL structure):
What Is URL Encoding?
If you have ever tried to put a search query with spaces or special characters into a URL, you know the pain: the browser needs those characters encoded so the URL doesn't break. URL encoding (or percent encoding) converts reserved and unsafe characters into a % followed by two hex digits. It is defined in RFC 3986 and is fundamental to how the web works. A space becomes %20, & becomes %26, and so on. This tool provides both encodeURIComponent() and encodeURI() modes, runs entirely in your browser, and never sends your data to a server.
This tool offers two modes matching JavaScript's built-in functions: Component mode uses encodeURIComponent() which encodes everything except A–Z a–z 0–9 - _ . ! ~ * ' ( ). Use this for individual query parameter values. Full URL mode uses encodeURI() which preserves URL structure characters like : / ? & #. Use this for complete URLs. To decode, use the URL Decoder.
How to Use This Tool
Choose Encoding Mode
Select Component to encode a query parameter value (e.g., a search term). Select Full URL to encode a complete URL while keeping its structure intact. Click Sample to load an example.
Paste Your Input
Type or paste your text into the left editor. The right panel updates automatically with the percent-encoded output. Encoding runs entirely in your browser—no data is sent to any server.
Copy or Download
Click Copy to put the encoded string on your clipboard, or Download to save it as a .txt file. To reverse the process, use the URL Decoder.
Component vs Full URL Mode
For query string values always use Component mode. For example, if the search term is rock & roll, the correct query parameter is q=rock%20%26%20roll—not q=rock & roll which breaks the query string structure.
Frequently Asked Questions
Is my data private?
Yes. Encoding runs entirely in your browser. No data is sent to any server.
What is the difference between %20 and + for spaces?
In the application/x-www-form-urlencoded format (HTML form submissions), spaces are encoded as +. In standard percent encoding (RFC 3986), spaces are encoded as %20. This tool uses %20. If you need + for form data, replace %20 with + after encoding.
Which mode should I use for a full URL?
Use Full URL mode (encodeURI) when encoding a complete URL you want to keep navigable. Use Component mode (encodeURIComponent) when encoding a value that will be placed inside a query parameter, path segment, or fragment. The WHATWG URL Living Standard is the definitive reference for how modern browsers parse and encode URLs.
Does it support Unicode characters?
Yes. Non-ASCII characters like é, 中, or emoji are first encoded to UTF-8 bytes and then percent-encoded. For example, é becomes %C3%A9.
Related Tools
For the specification, see RFC 3986. MDN covers encodeURIComponent and encodeURI in detail.