URL Encoder
Percent-encode text so it is safe to use inside a URL.
When you put text into a web address — especially query parameters — spaces and symbols like &, ?, = and / can break the URL. This tool percent-encodes your text so it travels safely, exactly the way browsers and APIs expect.
Formula / method
Examples
hello%20world
a%26b%3Dc
What percent-encoding does
URLs may only contain a limited set of characters, so anything outside that set is replaced by a percent sign followed by the character's byte value in hexadecimal (using UTF-8). A space becomes %20, an ampersand becomes %26, and a plus sign becomes %2B. This keeps text from being misread as URL structure or breaking when copied into a browser or API call.
Encode values, not whole URLs
This tool works like JavaScript's encodeURIComponent, which also escapes reserved characters such as & = ? / : and #. That is exactly what you want when inserting a single value into a query string, for example a search term or an email address. Do not run a complete URL through it, or the slashes and question mark that give the address its shape will be escaped too.
Unreserved characters (A-Z, a-z, 0-9, and - _ . ~) are always left alone. To turn %-codes back into readable text, use the matching URL Decoder.
Where it's used
- Putting a search term or filter value safely into a query string
- Encoding an email address or a URL that is passed as a parameter
- Building API request links in code without breaking them
- Encoding spaces and symbols in a link before sharing it
- Preparing form data for an application/x-www-form-urlencoded request
Real-world examples
- 'hello world' becomes hello%20world, since a space is encoded as %20
- 'a&b=c' becomes a%26b%3Dc so the & and = are not misread as URL syntax
- An email like name@site.com inside a query becomes name%40site.com
A bit of history
Percent-encoding was defined for URLs in the mid-1990s, notably in RFC 1738 (1994) co-authored by web inventor Tim Berners-Lee, and later refined by RFC 3986 in 2005.
FAQ
When do I need URL encoding?
Any time text goes into a URL — query strings especially. Encoding keeps characters like spaces, &, ? and = from being misread as URL syntax.