usefmtly

URL Encoder / Decoder

URL Encode / Decode — Free online URL encoder and decoder. Percent-encode special characters for use in URLs and query strings, or decode percent-encoded URLs back to readable text. Supports component and full URI encoding.

0Input length
0Output length
Comp.Mode
YesValid
Plain text / URL
Encoded URL

How to encode and decode URLs

  1. Choose Encode or Decode. Encode converts plain text or a URL into percent-encoded form; Decode reverses it.
  2. Choose Component or Full URI mode. Use Component for query string values and path segments — it encodes everything including &, =, ?. Use Full URI to encode a complete URL while keeping its structural characters intact.
  3. Paste your input and the result appears instantly.
  4. Use Swap to flip the result back into the input and toggle direction — useful for double-checking a round-trip.

Common percent-encoded characters

CharacterEncodedNotes
Space%20Also written as + in form data
&%26Separates query parameters
=%3DSeparates key from value
?%3FMarks the start of a query string
#%23Fragment identifier
/%2FPath separator — encoded in component mode
+%2BPlus sign (not a space in component mode)
@%40User info in authority
é (UTF-8)%C3%A9Multi-byte: each byte encoded separately
🔗 (emoji)%F0%9F%94%974-byte UTF-8 → 4 encoded sequences

Component vs Full URI

Component mode (encodeURIComponent) is for encoding a single part of a URL — a query value, a path segment, or a fragment. It encodes everything that is not an unreserved character, including ? & = # / :.

Full URI mode (encodeURI) is for encoding a complete URL. It preserves the characters that give a URL its structure — : / ? # @ & = + , ; — so the URL remains valid after encoding.

Related tools: Base64 Encoder for binary-safe encoding, HTML Entity Encoder for escaping HTML special characters, or ROT13 Encoder for simple cipher encoding.

Learn more

For a deeper dive into which characters need encoding, the difference between encodeURI and encodeURIComponent, and common encoding mistakes, see the URL Encoding Explained guide.

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) replaces characters that are not allowed in URLs with a percent sign followed by two hexadecimal digits representing the character's UTF-8 byte value. For example, a space becomes %20 and & becomes %26.

When should I use Component vs Full URI mode?

Use Component mode (encodeURIComponent) for encoding individual query string values or path segments — it encodes everything including &, =, ?, #, and /. Use Full URI mode (encodeURI) to encode a complete URL while preserving its structure — it leaves characters like :, /, ?, #, &, and = intact.

What is the difference between %20 and + for spaces?

%20 is the standard percent-encoding for a space in any part of a URL. The + sign is only valid as a space character in application/x-www-form-urlencoded query strings (HTML form submissions). This tool uses %20 which is universally correct.

Why does my URL need encoding?

URLs can only contain a limited set of ASCII characters. Characters outside this set — including spaces, accented letters, emoji, and symbols like <, >, {, } — must be percent-encoded. Without encoding, browsers may misinterpret or reject the URL.

Does URL encoding work with Unicode and emoji?

Yes. The text is first converted to UTF-8 bytes, then each byte outside the allowed set is percent-encoded. For example, the emoji 🔗 becomes %F0%9F%94%97.

Related Tools