Home » Developer Tools » URL Encoder / Decoder

Free URL Encoder and Decoder Online

Encode text for URLs or decode percent-encoded strings - instant and free.

Last updated 13 November 2026

Special characters break links. BotixTech's free URL encoder decoder converts text into safe percent encoded values - and decodes them back. Essential for developers working with query strings, APIs and redirects.

Paste your text or query value, click encode or decode, and copy the result. Our URL encode online tool is instant and free. It encodes one component at a time, so paste a value, not a full link.

How to Encode or Decode a URL

  1. Paste your input - a query value, a form value, or plain text.
  2. Click Encode or Decode - the conversion is instant.
  3. Copy the result - ready to use in code or links.

URL Tool Features

What Is URL Encoding

URL encoding, also called percent encoding, replaces characters that are not safe in a link with a percent sign followed by two hex digits. A space becomes %20, an ampersand becomes %26, and a question mark becomes %3F. The encoded text means exactly the same thing, but it can travel inside a URL without breaking the link.

Only some characters need encoding. Letters, digits and a few marks like a dot are left alone, because they are safe anywhere in a URL. These are called unreserved characters. Reserved characters like ? & = # / : and @ have jobs of their own inside a URL, so when they appear inside a value they must be encoded, or the browser reads them as structure instead of text.

Everything on this page runs in your browser. Your text is never sent to a server, and nothing is stored, so you can safely encode values from a private project or a client site.

Percent Encoding Reference Table

These are the codes this tool produces for the characters people encode most often. Each one was checked against the tool itself.

CharacterCodeWhy it is encoded
Space%20The most common character to encode
Ampersand%26Starts a new query value if left as is
Equals sign%3DSeparates a name from its value
Question mark%3FStarts the query part of a URL
Hash%23Starts a fragment and cuts the link short
Percent sign%25Starts a percent code, so it must be encoded itself
Slash%2FSeparates path parts
Colon%3ASeparates the scheme from the rest of the URL
At sign%40Separates user info from the host
Plus sign%2BMeans a space in form data, so it is encoded in values

Two details are worth knowing. First, the percent sign itself encodes as %25, which is why encoding a value twice gives %2520 instead of %20. Second, this tool leaves a small set of marks alone, including ! and the single quote and brackets, because encodeURIComponent treats them as safe. If you need strict RFC 3986 output for those marks, encode them by hand after you copy the result.

encodeURI vs encodeURIComponent

JavaScript has two encoding functions, and picking the wrong one is the most common URL encoding bug. encodeURI is for a whole URL. It encodes the space in a link but leaves the structure alone, so : / ? and # stay as they are and the link still works. encodeURIComponent is for one piece of a URL, such as a single query value. It encodes those structure marks too, because inside a value they are plain text, not structure.

This tool uses encodeURIComponent only. That makes it right for query values and form data, and wrong for a full link. Paste a whole link here and the tool encodes the :// and the ? as well, so the result is no longer a clickable link. It is still useful, for example when you need to pass a whole link as one query value inside another link, but it is not a way to make a full URL safe. A full URL mode that leaves the structure alone is a rebuild for this tool, not a feature it has today.

Use the JSON Formatter when a query value holds JSON, since a JSON string is full of quotes and braces that all need encoding before it can travel in a URL.

Worked Examples

Here is the exact test run from the live check on this page, with the numbers:

Input, a full link with a space and two query values:

https://example.com/a b?x=1&y=2

Encoded output, with every structure mark encoded too:

https%3A%2F%2Fexample.com%2Fa%20b%3Fx%3D1%26y%3D2

Decoding that output gives back the original link exactly, character for character. That round trip is the quickest way to check that nothing was lost.

A shorter example shows the same rules on plain words. The phrase fish & chips is 12 characters. Encoded it becomes fish%20%26%20chips, which is 18 characters. The space becomes %20 and the ampersand becomes %26, so 6 characters are added, about 50 percent more. Use the Diff Checker to compare a value before and after encoding side by side.

Non English text works the same way. The word caf with an accent on the e encodes as caf%C3%A9, because the accented letter is first turned into two UTF 8 bytes and each byte becomes a percent code. A smile emoji becomes %F0%9F%98%80, four bytes in all. Decoding reverses the same steps, so the original text comes back.

Code Examples

If you encode in code instead of in this tool, the same rules apply. In JavaScript, encodeURIComponent does exactly what this tool does:

encodeURIComponent("hello world")
// "hello%20world"

In Python, urllib.parse.quote gives the same result for a query value:

from urllib.parse import quote
quote("hello world", safe="")
# "hello%20world"

In PHP, rawurlencode is the matching function, and it also gives hello%20world for the same input. Note that PHP urlencode is different: it turns a space into a plus sign, which is only right for form data. If you work with other encodings too, the Text to Binary Converter shows how the same text looks in binary.

When to Encode and What to Watch For

Encode a value whenever it holds a space, a non English letter, or a reserved mark and it is about to travel in a link, a redirect, or an API call. A search box value with a space, a file name with an ampersand, and a redirect URL passed as a query value are the three cases that break most often.

Watch for double encoding. If a value is already encoded and you encode it again, the percent sign itself is encoded and %20 becomes %2520. A server that decodes once then sees %20 instead of a space. Encode each value once, and only decode a value that is still encoded.

Watch the plus sign trap too. In form data a plus sign means a space, but in a normal query value a space is %20. This tool encodes a plus sign as %2B and leaves a plus sign alone when decoding, so form data that uses plus for space is not handled here. That handling is part of the same rebuild as the full URL mode.

Decoding can fail. If the text holds a lone percent sign that is not followed by two hex digits, as in 100% off, the tool shows Invalid encoded input. Fix the input so every percent sign is part of a valid code like %20, then decode again.

Finally, encoding is not encryption. Anyone can decode percent encoded text in one step, so it does not hide secrets. Never put a password or a private token in a URL and rely on encoding to protect it.

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) replaces unsafe characters with a % followed by hex digits, so text can travel safely inside URLs. A space becomes %20, for example.

When do I need to encode a URL?

Whenever a link contains spaces, non-English characters, or symbols like & and ?. Encoding keeps the link working correctly.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL and leaves : / ? and # alone, so the link still works. encodeURIComponent encodes one component and encodes those marks too, so it is right for a query value or a form field. This tool uses encodeURIComponent only, so paste a value here, not a full link.

Is the URL encoder free?

Yes, completely free, no signup.

Is URL encoding the same as encryption?

No. Encoding only changes how text looks so it can travel in a link. Anyone can decode it in one step, so it does not hide secrets. Never put a password or a private token in a URL and rely on encoding to protect it. Use real encryption and keep secrets out of links.

What is double encoding and how do I avoid it?

Double encoding means encoding text that is already encoded. A space becomes %20 the first time, then the percent sign itself is encoded and %20 becomes %2520. A server that decodes once then sees %20 instead of a space. Encode each value once, and decode a value only if it is still encoded.

Why does a plus sign sometimes mean a space?

In form data a plus sign means a space, but in a normal query value a space is %20. That is why the same text can look different in different places. This tool encodes a plus sign as %2B and leaves a plus sign alone when decoding, so form data that uses plus for space is not handled here.

Can I encode non English text or emoji?

Yes. Letters outside basic English and emoji are turned into UTF 8 bytes first, then each byte becomes a percent code. The letter e with an accent becomes %C3%A9, and a smile emoji becomes %F0%9F%98%80. Decoding reverses the same steps, so the original text comes back.

What happens if I try to decode text with a lone percent sign?

The tool shows Invalid encoded input. Decoding fails when a percent sign is not followed by two hex digits, for example in 100% off. Fix the input so every percent sign is part of a valid code like %20, then decode again.