Developer Tools

URL Encoder

This free URL Encoder percent-encodes text, query parameter values and redirect URLs as you type, using JavaScript's encodeURIComponent, so spaces become %20, ampersands %26 and accented letters UTF-8 escapes like %C3%A9. It runs entirely in your browser, and nothing you enter is uploaded.

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. 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. 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. 3

    Copy it

    Click Copy to put the encoded string on your clipboard, or Clear to empty the input and start again.

  4. 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:

InputEncoded output
hello worldhello%20world
Tom & JerryTom%20%26%20Jerry
a+b=ca%2Bb%3Dc
50% off50%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 &lt;, 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

TermWhat it means here
Percent-encodingReplacing a byte with % followed by two hexadecimal digits, so a space becomes %20; the official name for URL encoding
Reserved charactersCharacters with a structural meaning in a URL, such as : / ? # & = +, which must be encoded when they appear inside a value
Unreserved charactersLetters, digits and a few marks that never need encoding; encodeURIComponent also leaves ! ~ * ' ( ) alone
UTF-8The byte encoding used for non-ASCII text before percent-encoding, which is why é becomes two bytes, %C3%A9
Query stringThe part of a URL after ?, made of name=value pairs separated by &
encodeURIComponentThe JavaScript function this tool uses; it encodes a single URL component, including reserved characters
encodeURIA related JavaScript function for whole URLs; it leaves : / ? # & = intact, so it is not used here

Frequently Asked Questions

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.

Sources and standards

Guides for URL Encoder