Runs in your browser. Your files and text never leave your device - nothing is uploaded.
Encode URLs and Query Parameters Online
The Tools Kit’s free URL Encoder percent-encodes any text so it can travel safely inside a link. Spaces, ampersands, slashes, question marks, accented letters and emoji are converted to their %XX form as you type, ready to paste into a query string, a redirect parameter or an API request.
Under the hood it uses JavaScript’s encodeURIComponent, the same function web developers call in their own code, so the output matches what a browser or Node.js would produce. Everything happens on your device: there is no upload, no server call and no limit on how often you use it. Need to go the other way? The URL decoder turns percent-encoded strings back into readable text.
How to Use the URL Encoder
- 1
Paste your text
Type or paste the value you want to encode into the Plain URL / Text box, such as a search term, a redirect URL or a query parameter value.
- 2
Read the encoded result
The percent-encoded version appears in the URL Encoded panel as you type. There is no button to press and no page reload.
- 3
Copy it
Click Copy to put the encoded string on your clipboard, or Clear to empty the input and start again.
- 4
Insert it into your URL
Paste the encoded value after the equals sign of the parameter it belongs to, for example after ?q= or &redirect=, leaving the rest of the URL as it is.
What Is URL Encoding (Percent-Encoding)?
A URL may only contain a limited set of ASCII characters, and several of those have a job to do: ? starts the query string, & separates parameters, = splits a name from its value and # starts the fragment. If a value you are sending contains one of those characters, the server will read it as structure rather than data. Percent-encoding solves this by replacing each unsafe byte with a percent sign and two hexadecimal digits.
Take the search term Tom & Jerry. Dropped raw into ?q=Tom & Jerry, the server sees a parameter q with the value “Tom ” and a stray second parameter. Encoded, it becomes ?q=Tom%20%26%20Jerry and arrives intact. Here is how the tool encodes a few common inputs:
| Input | Encoded output |
|---|---|
hello world | hello%20world |
Tom & Jerry | Tom%20%26%20Jerry |
a+b=c | a%2Bb%3Dc |
50% off | 50%25%20off |
/path?x=1#top | %2Fpath%3Fx%3D1%23top |
café | caf%C3%A9 |
Letters, digits and the marks - _ . ! ~ * ' ( ) are left as they are. Everything else, including line breaks (%0A), is encoded. Non-ASCII text is first converted to UTF-8 bytes, which is why é becomes the two-byte %C3%A9 and an emoji becomes four bytes such as %F0%9F%98%80.
encodeURIComponent vs encodeURI
JavaScript has two built-in URL encoding functions, and picking the wrong one is a common bug. encodeURI is designed for a complete URL, so it leaves : / ? # & = untouched; encodeURI("/path?x=1#top") comes back unchanged. encodeURIComponent, which this tool uses, is designed for one piece of a URL, so it encodes those characters too and returns %2Fpath%3Fx%3D1%23top.
The practical rule: encode each parameter value on its own, then assemble the URL. If you paste a full address such as https://example.com/search?q=hello world&lang=en, you get https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den. That is exactly right when the whole URL is the value of another parameter, for example ?redirect= or ?url=, but it is not a working link on its own.
URL Encoding vs Other Kinds of Encoding
Percent-encoding is only for URLs. To show characters such as < and & safely inside HTML, you need entities like <, which the HTML entity encoder produces. To pack binary data or arbitrary text into a compact ASCII string, use the Base64 encoder; note that standard Base64 output can contain +, / and =, so it still needs URL encoding before it goes into a query parameter.
If you want a clean, readable path segment rather than an escaped one, a slug generator turns a title like “Tom & Jerry Reviews” into lowercase words joined by hyphens, which needs no encoding at all.
Common uses
- Encoding a search term or filter value for a query string
- Passing a full URL as a redirect, callback or return parameter
- Building API request URLs by hand while testing an endpoint
- Escaping values that contain &, =, + or % so they are not misread
- Preparing UTM tags or tracking links with spaces and punctuation
- Encoding non-English text and emoji for links shared in email or chat
When you test a request on the command line, paste the encoded URL into your curl command and convert it to code with the curl converter; if the API answers with JSON, tidy the response with the JSON formatter. Turning a long tracking link into something people can scan? The QR code generator accepts the finished URL. For more encoders, converters and formatters, browse all developer tools.
URL encoding terms explained
| Term | What it means here |
|---|---|
| Percent-encoding | Replacing a byte with % followed by two hexadecimal digits, so a space becomes %20; the official name for URL encoding |
| Reserved characters | Characters with a structural meaning in a URL, such as : / ? # & = +, which must be encoded when they appear inside a value |
| Unreserved characters | Letters, digits and a few marks that never need encoding; encodeURIComponent also leaves ! ~ * ' ( ) alone |
| UTF-8 | The byte encoding used for non-ASCII text before percent-encoding, which is why é becomes two bytes, %C3%A9 |
| Query string | The part of a URL after ?, made of name=value pairs separated by & |
| encodeURIComponent | The JavaScript function this tool uses; it encodes a single URL component, including reserved characters |
| encodeURI | A related JavaScript function for whole URLs; it leaves : / ? # & = intact, so it is not used here |
Frequently Asked Questions
Paste the text into the Plain URL / Text box and the percent-encoded version appears instantly in the URL Encoded panel. For example, hello world&lang=en becomes hello%20world%26lang%3Den. Click Copy to use it.
It uses the JavaScript function encodeURIComponent, the standard way to encode a single URL component such as a query parameter value. Letters, digits and - _ . ! ~ * ' ( ) are left unchanged; every other character is converted to UTF-8 bytes and written as %XX.
encodeURIComponent encodes a single value, so it also escapes / ? # & = and :, which is what a query parameter needs. encodeURI is meant for a whole URL and leaves those structural characters intact. This tool only offers encodeURIComponent.
encodeURIComponent always writes a space as %20, which is valid anywhere in a URL. The plus sign for a space is a convention of application/x-www-form-urlencoded form data. The tool has no option to output + for spaces, but servers that parse form-style query strings accept %20 too.
Usually not. Encode only the value you are inserting into a parameter. Running a full URL through the tool turns https:// into https%3A%2F%2F and its ? and & into %3F and %26, which is only correct when that whole URL is itself being passed as a parameter value, such as a redirect target.
They are converted to UTF-8 bytes first and each byte is percent-encoded. café becomes caf%C3%A9, and the grinning face emoji becomes the four bytes %F0%9F%98%80.
encodeURIComponent cannot encode half of an emoji or other character made of a surrogate pair, which can happen when text is cut mid-character while copying. The tool shows an error instead of output; retype or recopy the character to fix it.
Paste them as they are. The tool encodes + as %2B, & as %26, = as %3D and % as %25, so a+b=c becomes a%2Bb%3Dc and 50% off becomes 50%25%20off. Without encoding, a server would read them as URL structure instead of data.
No, it only encodes. To turn %20, %26 and other escapes back into plain text, use the separate URL Decoder on The Tools Kit.
No. Encoding runs entirely in your browser with built-in JavaScript, so nothing you type is uploaded, stored or logged. That makes it safe to encode tokens, internal URLs or other sensitive values.
Reviewed by Raja Jahangir · Last reviewed: October 7, 2026
How do you URL encode a string?
To URL encode text, paste it and the percent-encoded version appears instantly. Spaces become %20, ampersands %26, slashes %2F, and question marks %3F, so 'hello world&lang=en' becomes hello%20world%26lang%3Den. Encoding follows the JavaScript encodeURIComponent standard, which leaves letters, digits, and - _ . ! ~ * ' ( ) unchanged, and runs entirely in the browser.
What is the difference between %20 and + for spaces?
Both represent a space, but in different contexts. %20 is the standard percent-encoding valid anywhere in a URL. The plus sign is only a space inside application/x-www-form-urlencoded data, such as HTML form submissions and query strings built by browsers. encodeURIComponent always outputs %20, which is safe in both places.
