Free URL Encoder — Encode & Decode URLs Online

A space in a URL breaks the link. URL encoding fixes it — but only if you encode the right part. Here is the 60-second version, with a free tool.

Encode or decode a URL free — in your browser →

Free · No signup · No watermark · Private

What is URL encoding?

URL encoding (also called percent-encoding, defined by RFC 3986) replaces characters that are not allowed in a URL with a % sign followed by two hexadecimal digits — the character's UTF-8 byte value. A space becomes %20, an ampersand becomes %26, and é becomes %C3%A9 (its two UTF-8 bytes).

A URL may only contain a limited set of ASCII characters. Everything else — spaces, non-English text, emoji, and characters that already mean something in a URL (?, &, =, #) — must be encoded, or the link breaks, the query string splits in the wrong place, or the server reads a different value than you sent.

The characters you will meet most

  • Space → %20
  • & → %26 — the query-string separator; an unencoded & inside a value splits your parameter in two
  • ? → %3F and = → %3D — also structural, so they must be encoded inside values
  • / → %2F — a slash that is part of a value, not a path separator
  • # → %23 — otherwise everything after it is treated as a fragment and never sent to the server
  • % → %25 — the escape character itself
  • + → %2B — a literal plus, not a space
  • é → %C3%A9, and an emoji like 😀 becomes four bytes: %F0%9F%98%80

Component vs full URL — the #1 mistake

There are two encoding functions, and using the wrong one is the most common URL-encoding bug:

  • Encode component (encodeURIComponent in JavaScript) — for a single value: a query parameter value, a path segment, a slug. It encodes everything structural, including /, ?, & and =. That is exactly what you want inside a value — an & in a search term must not split your query string.
  • Encode full URL (encodeURI) — for a complete address. It leaves the URL's structure intact (:, /, ?, #, =) and encodes only the unsafe characters.

Encode a whole URL with component mode and you destroy it: https://example.com/search?q=hello world becomes https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world — no longer a link at all. Encode only the value instead: https://example.com/search?q=hello%20world.

When you need to encode

  • Query parameter values — any user input going into a ?q= value: search terms, names, addresses.
  • Redirect URLs and OAuth callbacks — a redirect_uri nested inside another URL must be fully encoded, or its own ? and & break the outer URL.
  • UTM links — campaign values with spaces or special characters.
  • Form data — in application/x-www-form-urlencoded bodies a space is written as +, not %20. That rule applies to form submissions only; a + in a URL path stays a literal plus sign.

The double-encoding trap

If a value passes through two encoders, the % itself gets encoded: a space becomes %20, then %2520. The server decodes once and sees the literal text %20 instead of a space. If your URLs contain %25, something encoded twice — decode until the %25 is gone, then fix the code so it encodes exactly once.

Decode before you click

Decoding is also a safety check. A suspicious link hides its real destination behind percent-encoding — paste it into the decoder and read the plain URL before you click. If the decoded address points somewhere you did not expect, do not open it. BConvert's decoder shows an error on malformed input (such as a lone % with no hex digits after it) instead of guessing.

How to encode a URL with BConvert

  1. Open the URL Encoder & Decoder.
  2. Paste the full URL or the single value you need to encode.
  3. Choose Encode component for a query value, Encode full URL for a complete address, or Decode to turn an encoded string back into readable text.
  4. Copy the result. Everything runs in your browser — your URLs are never uploaded, which matters when they carry tokens or session IDs.

Encode it in code

  • JavaScript: encodeURIComponent("hello world & friends") for a value; encodeURI("https://example.com/a b") for a full URL; decodeURIComponent("%20") to reverse it.
  • Python: urllib.parse.quote("hello world", safe="") for a value, urllib.parse.quote_plus(...) for form data, urllib.parse.unquote(...) to decode.
  • curl: curl -G "https://example.com/search" --data-urlencode "q=hello world" encodes the value for you.

Frequently asked questions

What is URL encoding?

URL encoding (percent-encoding, defined by RFC 3986) replaces characters that are not allowed in a URL with a % sign followed by two hexadecimal digits — the character's UTF-8 byte value. A space becomes %20, & becomes %26, and é becomes %C3%A9. It keeps links valid when they carry spaces, non-English text or reserved characters.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent encodes a single value — a query parameter, a path segment, a slug — and escapes everything structural, including /, ? and &. encodeURI encodes a complete URL and leaves its structure (:, /, ?, &, =) intact. Use component mode for values and full-URL mode for whole addresses; mixing them up is the most common encoding bug.

Why is a space %20 and not + in a URL?

In a URL path or query value, a space is %20. The + for a space only applies inside application/x-www-form-urlencoded form data — a different encoding rule. If you put + in a path, it stays a literal plus sign, not a space.

What does %2F mean in a URL?

%2F is an encoded forward slash (/). It appears when a slash is part of a value rather than a path separator — for example a redirect URL nested inside a query parameter. Decoding it turns it back into /.

Is URL encoding the same as encryption?

No. URL encoding is not encryption and not security — anyone can decode a percent-encoded string instantly. It only makes characters safe to transport in a URL. Never use it to hide passwords, tokens or secrets; a % sign in front of a value protects nothing.

Why does my URL contain %2520?

That is double-encoding: the value was encoded twice. The first pass turned a space into %20; the second pass encoded the % itself into %25, producing %2520. Decode once to get %20, and again to get the space — then fix the code so it encodes only once.

Try it now

Ready? Encode or decode a URL — free, instant, no signup, nothing uploaded.

Related tools