URL Encode
Percent-encode text so it is safe inside a URL query string or path — spaces, &, ?, #, / and non-English characters become %XX codes. Works for text, JSON, XML or YAML. Runs in your browser.
Suggested tools
About URL Encode
URL Encode percent-encodes text so it can be placed safely in a URL path or query string: spaces become %20, & becomes %26, and non-English characters become their UTF-8 %XX sequences. It works on plain text, JSON, XML or YAML.
It uses the same rules as JavaScript's encodeURIComponent, so the result is suitable for a single query-parameter value. It runs entirely in your browser, so nothing you paste is uploaded.
How to use URL Encode
- Paste the text you want to put in a URL.
- Press Convert.
- Copy the encoded value into your link or request.
Key features
- encodeURIComponent rules
- UTF-8 encoding of non-English characters
- Safe for query-parameter values
- Decode with URL Decode
Example
Spaces, &, / and the ₹ sign are percent-encoded.
chai & samosa / ₹50
chai%20%26%20samosa%20%2F%20%E2%82%B950
When to use URL Encode
- Putting search terms or names into a query string.
- Building API request URLs by hand.
- Encoding redirect URLs that are passed as a parameter.
Tips and common problems
- Encode only the parameter values, not the whole URL.
- Encode each value once — double encoding turns %20 into %2520.
- Non-English text such as Gujarati becomes several %XX codes per letter; that is normal UTF-8.
Frequently asked questions
No — encode only the values you insert (such as a search term). Encoding a whole URL also encodes : and /, which breaks it.
%20 is correct everywhere in a URL. The + form is only used in HTML form submissions.
Letters, digits and - _ . ! ~ * ' ( ) are not encoded.
Guides
- Base64 Explained — Base64 explained for beginners: what it is, why it exists, where it is used (data URIs, JSON, email), and when you should and should not use it.