URL Encoder & Decoder — Free Online Tool

Free Forever

What is URL Encoding?

URL encoding, also called percent-encoding, converts characters that aren't safe inside a URL into a % followed by their hexadecimal value. This lets URLs carry spaces, symbols, and non-ASCII text without breaking the structure of the address or being misinterpreted by browsers and servers.

How to Use This URL Encoder

  1. Paste your text or URL into the Input box.
  2. Toggle Full URL mode if you're encoding an entire URL rather than a single value, so structural characters like : and / are preserved.
  3. Click Encode or Decode, then copy the result with Copy Output.

When Do You Need URL Encoding?

URL encoding is required whenever a value being inserted into a URL — a search query, form field, or path segment — could contain spaces, ampersands, question marks, or other reserved characters. Without encoding, these characters can break the URL's structure or be parsed as something other than intended, such as a query string being cut short at an unescaped &.

Frequently Asked Questions

URL encoding vs Base64?
URL encoding (percent-encoding) escapes characters with %XX hex codes specifically so a string is safe inside a URL. Base64 is a general binary-to-text scheme unrelated to URL structure. They serve different purposes and are not interchangeable.
When to encode URLs?
Encode whenever a value you're inserting into a URL — a query parameter, form value, or path segment — might contain spaces, symbols, or non-ASCII characters that would otherwise break the URL or change its meaning.
What characters need encoding?
Reserved characters such as space, &, ?, #, %, +, and non-ASCII characters must be percent-encoded. Letters, digits, and a small set of unreserved characters (- _ . ~) can remain as-is.
Difference encodeURI vs encodeURIComponent?
encodeURIComponent escapes nearly every special character and is meant for individual values like query parameters. encodeURI preserves characters that are structurally part of a URL (such as :, /, ?, &) and is meant for encoding a full URL.