0
Input Characters
0
Output Characters
0
Encoded Chars
Encode
Current Mode
βš™οΈ Encoding Mode
βš™οΈ Additional Options
πŸ“ URL or Text Input 0 characters
βœ… Encoded Output 0 characters
πŸ” URL Breakdown Parsed components
Protocol β€”

What Is URL Encoding?

URL encoding (also called percent-encoding) is a method of converting characters that aren't allowed in URLs into a safe format. Each unsafe character is replaced with a % symbol followed by its two-digit hexadecimal code. For example, a space becomes %20, and an ampersand becomes %26.

Why Is URL Encoding Needed?

URLs can only contain a limited set of characters safely. Reserved characters like ?, &, =, and # have special meaning in URLs β€” if you include them literally, they'll be misinterpreted by servers and browsers. Non-ASCII characters (Γ©, ΓΌ, Γ±, δΈ­ζ–‡, emoji) and unsafe ASCII characters (space, <, >, ") must also be encoded.

Original:   hello world
Encoded:    hello%20world

Original:   search?q=cafΓ© au lait&sort=asc
Encoded:    search%3Fq%3Dcaf%C3%A9%20au%20lait%26sort%3Dasc

How to Use This Tool

  • Choose a mode: Encode or Decode.
  • Pick an encoding option β€” Component, Full URL, or Safe/Minimal.
  • Type or paste your URL or text into the input box.
  • Click the main button to convert. The result appears instantly.
  • View the URL breakdown below to see the protocol, host, path, and query parameters.

Encoding Modes Explained

  • Component encoding (default): Uses JavaScript's encodeURIComponent(). Encodes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ). Best for encoding a single value β€” like a search query or a query parameter value.
  • Full URL encoding: Uses JavaScript's encodeURI(). Also preserves URL structural characters like : / ? # & = so the URL stays syntactically valid. Best for encoding an entire URL that already has structure.
  • Safe / minimal encoding: Encodes only characters that are truly unsafe in a URL β€” spaces, quotes, angle brackets, curly braces, pipes, backslashes, carets, backticks, and non-ASCII. Preserves almost all URL syntax. Best for gently cleaning URLs that have spaces or odd characters.

Reserved vs Unreserved Characters

The URL spec (RFC 3986) defines three character sets:

  • Unreserved (safe, never encoded): A-Z a-z 0-9 - _ . ~
  • Reserved (have special meaning): ! * ' ( ) ; : @ & = + $ , / ? # [ ]
  • Unsafe (must be encoded): space, ", <, >, %, {, }, |, \, ^, `, and all non-ASCII

Common Use Cases

  • Search queries β€” encode user input before appending to a URL.
  • Query parameters β€” encode values that contain &, =, or spaces.
  • API calls β€” build safe request URLs programmatically.
  • File paths β€” encode filenames with spaces or special characters.
  • Debugging β€” decode a long URL to see what's actually being sent.
  • Reading analytics β€” decode referral URLs and campaign parameters.
  • OAuth and redirects β€” encode callback URLs and state parameters.

Component vs Full URL β€” Which Should I Use?

  • Use Component encoding when you're encoding a value β€” like a search term, a user's name, or a parameter value that will be inserted into a URL.
  • Use Full URL encoding when you're encoding an entire URL that already has ?, &, and / in it, and you don't want those characters destroyed.
  • Use Safe encoding when you just want to fix spaces and odd characters in an otherwise-valid URL.

The + vs %20 Question

In the query string portion of a URL (after ?), + is often used as a shorthand for a space, especially in HTML form submissions (application/x-www-form-urlencoded). However, this is not a general URL rule β€” in the path portion, + means a literal plus sign.

When you decode with "Decode + as space" enabled, the tool converts + to a space. This is standard for query strings. When disabled, + stays as a literal plus sign.

Related Tools

Privacy Note

All encoding and decoding happens in your browser. Your input is never uploaded to a server, never stored, and never shared. Close the tab and it's gone.