Skip to the content

Contact usFree tools · No signup · Files stay on your device

Developer Tools

URL Encoder: the complete guide to percent-encoding URLs

URL Encoder: the complete guide to percent-encoding URLs

Characters such as spaces, &, # and Bangla letters are not allowed to appear as they are inside a web address. Percent-encoding fixes that by writing each of them as a % followed by two hex digits, so a space becomes %20. Our free URL Encoder does this in your browser, for a single value or for a complete link, and shows the result broken into its parts.

This guide explains which of the two modes to choose, what each checkbox changes, and the mistakes that cause broken links and double encoding. If you need to turn an encoded link back into readable text, read the companion URL Decoder guide.

What URL Encoder does

It converts your text to UTF-8 bytes and writes every byte that is not safe as %XX. It never opens, fetches or checks the address. There are two ways to run it, and the choice matters more than any other setting:

  • Component / value is for one piece of a URL: a query value, a path segment or an email address inside a link.
  • Full URL is for a whole address that already has its structure and just contains a few unsafe characters, such as spaces or non-English letters.

It does not shorten links, does not check that a page exists, and it is not a way to hide anything.

How to use URL Encoder, step by step

  1. Open URL Encoder. Mode is set to Encode.
  2. Under "What to encode", choose Component / value or Full URL.
  3. Type or paste your text into the box. The label reads "Plain text", and the hint beneath it explains what the chosen mode does.
  4. Optionally tick Spaces as + (form encoding) or Also encode ! ' ( ) * (RFC 3986). These two boxes appear only in Component mode.
  5. Read the Result panel. It updates as you type. Press Copy, or Download to save a text file named "Tech Solution Point - URL encoded.txt". Clear empties the input.
  6. Check the numbers under the panels: Input length, Output length and Escapes added.

If the box holds a complete address, such as https://..., a URL parser panel appears underneath. It lists the protocol, host, port, path, number of query parameters, fragment and origin, and a table of each parameter with its decoded value. It is a quick way to see whether your link still has the shape you intended.

Component or Full URL: the key choice

The two modes use different rules. This table shows which characters each one leaves alone:

Mode Characters left as they are
Component / value A–Z a–z 0–9 - _ . ! ~ * ' ( )
Component, with the RFC 3986 box ticked A–Z a–z 0–9 - _ . ~
Full URL everything above, plus ; , / ? : @ & = + $ #

Everything else is encoded. Component mode encodes / ? & = # : because inside a value they would break the link. Full URL keeps them because they are the link's own punctuation.

A worked example for each

Take a search for Dhaka & Chattogram: 50% off!.

In Component mode the result is:

Dhaka%20%26%20Chattogram%3A%2050%25%20off!

The & becomes %26 and the colon %3A, so neither can be mistaken for the link's own structure. The % itself becomes %25, which matters, because a raw % would be read as the start of an escape. You would then build the link yourself: https://example.com/search?q= followed by that result.

Now take https://example.com/search?q=café & crème in Full URL mode:

https://example.com/search?q=caf%C3%A9%20&%20cr%C3%A8me

The accents and spaces are encoded, but the & is left in place. That means a server will read this as two parameters: q with the value "café " and another, unnamed one containing " crème". Full URL cannot know that your & was part of the value. If a value can contain &, =, # or ?, encode the value in Component mode first.

Finally, the whole link in Component mode gives:

https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dcaf%C3%A9%20%26%20cr%C3%A8me

That is not a clickable link. It is the right form when a link must travel as the value of another parameter, such as a redirect or next address.

Every option explained

Spaces as + (form encoding)

Normally a space becomes %20, which is valid everywhere. When you tick this box, %20 is replaced by +. That is the convention for form data, where + stands for a space. It only affects the space. A real plus sign in your text is still encoded as %2B, so a+b stays safe: with or without the box, it becomes a%2Bb. Use + only where the receiving system expects form encoding, such as a query string produced by an HTML form. In a URL path, + is just a plus sign.

Also encode ! ' ( ) * (RFC 3986)

These five characters are allowed by the browser's component rule, but they count as reserved in the stricter standard, RFC 3986. Some APIs, such as signature checks for OAuth, require them to be encoded. With the box ticked, Rahim's (new) shop* becomes Rahim%27s%20%28new%29%20shop%2A instead of Rahim's%20(new)%20shop*. If nobody has told you that a service needs it, leave it off.

What it accepts and its limits

  • Input: any text, in any script. It is encoded as UTF-8, so one Bangla letter, which is three bytes, becomes nine characters. The word বাংলা becomes %E0%A6%AC%E0%A6%BE%E0%A6%82%E0%A6%B2%E0%A6%BE.
  • Size: the page sets no limit of its own.
  • Broken characters: a lone half of an emoji is replaced by the replacement character before encoding, so the tool never fails with an error.
  • Output: one line of text, with no added spaces or line breaks.
  • Not done: the link is never visited, so a typo in a domain name is not noticed.

Privacy

URL Encoder works in your browser. What you type is not uploaded or stored. That is useful for links that contain tokens, email addresses or phone numbers, such as 01712345678 in a query string. Remember, though, that encoding hides nothing. Anyone can reverse it, and a secret in a URL is still visible in browser history and server logs.

Tips to work faster

  • Encode only the value, not the name. In ?q= plus an encoded term, the q= stays plain.
  • Encode each path segment separately and join them with real slashes. If you encode a whole path in Component mode, the slashes become %2F.
  • For a slug such as dhaka-office-address, a clean slug needs no encoding at all. The Slug Generator makes one from your title.
  • To put data other than text in a URL, such as a file, use Base64 Encoder/Decoder with its URL-safe option, then encode the result only if needed.
  • Use the Mode switch for a quick round trip. When you press Decode, the encoded result moves into the input box, and you can check that it comes back unchanged.

Common problems and how to fix them

This is double encoding. The % of an existing %20 was encoded again as %25. It happens when Full URL mode or Component mode is run on text that is already encoded. Encode only plain text, once. If you already have the doubled version, switch to Decode and use the Decode again button. The sibling guide on reading encoded URLs shows how.

My parameter value was cut off at the &

The & ended the value. Encode the value alone in Component mode so that it becomes %26, and put it back into the link.

A # starts the fragment, and servers never receive it. If the # belongs in your value, as in Flat #5, it must be written %23. Component mode does that.

A space can be %20 or +. Which one is right depends on the receiver. For ordinary paths use %20. For form-style query strings, either is read as a space, as long as the receiver follows form decoding.

Spaces or ! ' ( ) * in Full URL mode

The two checkboxes, Spaces as + and the RFC 3986 box, exist only in Component mode, and they no longer apply in Full URL mode, even if you ticked them before switching. A full URL always keeps ! ' ( ) * as they are and writes spaces as %20.

The parser panel does not appear

It shows only for a complete address that starts with a scheme and ://, such as https://example.com. A bare value, a path and a domain without https:// are not parsed.

Quick checklist

  • Component for a value, Full URL for a whole address.
  • Never encode text that is already encoded.
  • Encode any value that may contain &, =, # or ? before it goes in a link.
  • Use Spaces as + only for form-style data.
  • Keep secrets out of URLs, encoded or not.

Frequently asked questions

Why did my link break after I encoded the whole URL as a Component?
Component mode encodes the slashes, colon and question mark as well, so https://example.com turns into https%3A%2F%2Fexample.com, which is no longer a clickable address. Use Component for a single value, such as one query parameter, and Full URL for a complete link.
Does Full URL mode fix an ampersand inside a search term?
No. It leaves & and = alone because they have a job in a query string. If the & belongs to a value, such as Tom & Jerry, encode that value alone in Component mode and then put it into the link.
How many characters does a Bangla letter become?
Nine. Each Bangla letter is three bytes in UTF-8 and each byte is written as a % and two hex digits. The word বাংলা, five letters, becomes 45 characters.
What does the Escapes added figure count?
It counts the % escapes in the result, each one a % followed by two hex digits. It lets you see at a glance how much of your text had to be encoded.
What happens if my text contains half of an emoji?
A lone surrogate, which is half of a character that was cut apart, cannot be encoded. The tool replaces it with the replacement character before encoding, so the output never fails.
Found this useful? Share it

Tools in this guide

Main tool

URL Encoder

Make any text safe to put in a URL.

Open tool

URL Decoder

Turn unreadable links full of %20, %3A and %2F back into plain text.

Open tool

Base64 Encoder/Decoder

Convert text or any file to Base64, or decode Base64 back to readable text or the original file.

Open tool

Slug Generator

Convert any title into a short, readable URL slug — accents removed, symbols cleaned up and words joined with hyphens.

Open tool

Back to all guides & blog