URL Encoder
Percent-encode text or a URL component in your browser the way encodeURIComponent does. Nothing is uploaded and nothing is stored.
What percent-encoding does, and how it differs from encodeURI
Percent-encoding replaces a character with its UTF-8 bytes, each written as a percent sign and two hex digits: a space becomes %20 and é becomes %C3%A9. This page escapes every character outside the unreserved set, which is what encodeURIComponent does — the slash, question mark, equals sign and ampersand are escaped too — so the result is safe to paste into a query value or a path segment without changing the URL's structure. encodeURI is the other rule: it leaves the URL's own syntax alone and escapes only what is illegal anywhere in a URL, which is right when the input is a complete address you do not intend to split. The difference is not cosmetic: encode a search for a&b with the wrong rule and the server receives a search for a plus a parameter named b. Encoding is not sanitising either, since an escaped value is still the value, so validate on the server. If the document you are encoding is JSON, XML or YAML, use json-url-encode, xml-url-encode or yaml-url-encode, which escape those formats for the same purpose.
How to use it
URL Encoder: paste the text or URL into the box above, and press Run to get the percent-encoded text below.
Worked example
Input:
a b&c=d/é?x=1
Output:
a%20b%26c%3Dd%2F%C3%A9%3Fx%3D1
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads text or URL and returns percent-encoded text; reloading the page discards both.
Percent-encoding replaces a character with its UTF-8 bytes, each written as a percent sign and two hex digits: a space becomes %20 and é becomes %C3%A9. This page escapes every character outside the unreserved set, which is what encodeURIComponent does — the slash, question mark, equals sign and ampersand are escaped too — so the result is safe to paste into a query value or a path segment without changing the URL's structure. encodeURI is the other rule: it leaves the URL's own syntax alone and escapes only what is illegal anywhere in a URL, which is right when the input is a complete address you do not intend to split. The difference is not cosmetic: encode a search for a&b with the wrong rule and the server receives a search for a plus a parameter named b. Encoding is not sanitising either, since an escaped value is still the value, so validate on the server. If the document you are encoding is JSON, XML or YAML, use json-url-encode, xml-url-encode or yaml-url-encode, which escape those formats for the same purpose.
Percent-encode text or a URL component in your browser the way encodeURIComponent does. Nothing is uploaded and nothing is stored.
How to use it
URL Encoder: paste the text or URL into the box above, and press Run to get the percent-encoded text below.
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads text or URL and returns percent-encoded text; reloading the page discards both.
What to Expect
Best for
- Converting text or URL to percent-encoded text when the data is already on screen.
What this tool keeps
- Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
Sample input
a b&c=d/é?x=1
Sample output
a%20b%26c%3Dd%2F%C3%A9%3Fx%3D1
Frequently asked questions
How do I use the url encoder?
URL Encoder: paste the text or URL into the box above, and press Run to get the percent-encoded text below.
Is my input uploaded?
No. The text is parsed on this page with JavaScript and is never posted to a server.
Is there a size limit?
Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.