Make any text safe to put in a link.

Links can only carry a small set of characters. Spaces, accents, emoji and symbols such as & or ? have to be written as percent codes like %20, or the link breaks or means something else.

This tool writes those codes for you, turns encoded links back into readable text, and lists the parts of a full URL so you can check each query value.

Runs in your browser. Nothing is uploaded.

More developer tools · All 54 tools

How to use it

  1. Paste text or a whole link into Input.
  2. Pick a Mode: Component for one query value or path piece, Whole URL to keep the link working, or Form data if spaces should become +.
  3. Tick Also encode ! ’ ( ) * (RFC 3986) if the system you are feeding wants the strictest form.
  4. Press Encode or Decode, then Copy output.
  5. If the input is a full URL, read the URL parts table to see the host, path, fragment and every query parameter decoded.

Good to know

What percent-encoding does

RFC 3986 lets a URL use only a limited set of characters. Everything else is turned into UTF-8 bytes, and each byte is written as % followed by two hexadecimal digits.

  • Always safe, never encoded: A–Z a–z 0–9 - . _ ~
  • Reserved, with a job inside URLs: : / ? # [ ] @ ! $ & ’ ( ) * + , ; =

Worked examples

InputModeOutput
fish & chipsComponentfish%20%26%20chips
fish & chipsForm datafish+%26+chips
caféComponentcaf%C3%A9
👋Component%F0%9F%91%8B

The é takes two bytes in UTF-8, so it becomes two codes. The emoji takes four.

Choosing the mode

Component encodes reserved characters too. Use it for a single value you are placing after ?q=, because an unencoded & there would start a new parameter. Whole URL leaves : / ? & = # alone, so https://example.com/a b?x=1 becomes https://example.com/a%20b?x=1 and still works. Form data follows the application/x-www-form-urlencoded format that web forms send, where a space is +; decoding in this mode turns + back into spaces.

When decoding fails

Every % must be followed by two hex digits, and the bytes must form valid UTF-8. A lone %, or %C3 without its second byte, cannot be decoded, and the tool says so instead of guessing. Encoding twice is a common slip: %20 encoded again becomes %2520.

Questions.

Should a space be %20 or +?

In a URL path it is always %20. In query strings sent by HTML forms, + is used instead. Both decode to a space in Form data mode.

Why did my link stop working after encoding?

You probably encoded the whole link in Component mode, which also encodes the : and / that make it a link. Use Whole URL for full links, Component for the pieces.

What does the strict option change?

It also encodes ! ’ ( ) * as %21 %27 %28 %29 %2A. Most systems do not need it, but some signing schemes and older servers expect it.

Why do I see %25 in a link?

%25 is an encoded percent sign. It usually means something was encoded twice. Decode once and check whether the result looks right.

Can it read emoji and other languages?

Yes. Text is turned into UTF-8 bytes before encoding, which is what browsers and servers expect, so any script or emoji round-trips.