URL Encoder Online - Free Percent Encoding Tool

Encode URLs and special characters. Fast, secure, and completely free. All processing happens in your browser — no data is sent to any server.

What is a URL Encoder?

URL encoding (percent-encoding) replaces characters that aren't safe inside a URL — spaces, &, =, #, and non-ASCII characters — with a % followed by their hexadecimal byte value, so the URL can be transmitted without ambiguity between the browser, the server, and every proxy in between. A space becomes %20, an ampersand inside a query value becomes %26, and so on. Without this, a query string containing a literal & inside one of its values would be misread as the start of a new parameter, silently corrupting the request.

How to Use URL Encoder

  1. Paste the raw text or URL component you want to encode
  2. The percent-encoded result appears instantly as you type
  3. Choose between full-component encoding (encodeURIComponent) and encoding a whole URL (encodeURI) depending on what you're building
  4. Copy the encoded string to use in a query parameter, form action, or API request
  5. Use the URL Decoder to reverse the process when reading an encoded value

Key Features

Why Use URL Encoder?

Any time a value you don't fully control — a search term, a filename, a piece of user-generated text — needs to become part of a URL, it needs percent-encoding first, or the request can break in ways that are hard to diagnose: a query parameter silently truncated at an unescaped &, a redirect URL that loses its trailing path because of an unescaped #, or a file download that 404s because a space in the filename split the URL. Encoding by hand is easy to get wrong for edge cases like +, which means a literal space in a query string but not in a path segment.

Common Use Cases

Frequently Asked Questions

What's the difference between encodeURI and encodeURIComponent?

encodeURI leaves reserved URL characters like &, =, and / untouched because it assumes you're encoding a whole URL; encodeURIComponent escapes those characters too, since it assumes you're encoding a single value that will be placed inside a URL (like a query parameter).

Why does %20 represent a space instead of a plus sign?

%20 is the standard percent-encoding for a space in a URL path or query component. A literal + is sometimes used to mean 'space' specifically inside application/x-www-form-urlencoded form bodies, which is a different, older convention.

Do I need to encode a full URL, including https:// and the domain?

No — encode only the parts that come from user input or dynamic values, like a query parameter or path segment. Encoding the protocol or domain would break the URL.

Can encoding help prevent a class of security issues?

Correct encoding of untrusted input before it's inserted into a URL helps prevent certain injection issues, but it's one layer among several — always validate and sanitize input on the server too.

What happens if I encode already-encoded text by mistake?

You get double-encoding — a % becomes %25, and decoding once won't fully recover the original. Always check whether a value is already encoded before encoding it again.

Guides

Related Tools