HomeToolsURL Encoder/Decoder

URL Encoder/Decoder

Encode and decode URL components for safe transmission. Handle special characters, query parameters, and URL formatting.

Encode URLs for safe transmissionDecode URL-encoded stringsHandle special charactersQuery parameter supportReal-time conversionCopy results

Text/URL to Encode

URL Encoded

URL Encoding Types

Component Encoding (encodeURIComponent)

Encodes all special characters except: A-Z a-z 0-9 - _ . ! ~ * ' ( )

Use for: Query parameters, path segments, form data

Full URL Encoding (encodeURI)

Preserves URL structure characters like :, /, ?, #, but encodes other special characters

Use for: Complete URLs with protocol and domain

Common encoded characters: Space → %20, & → %26, = → %3D, ? → %3F, # → %23

How to Use the URL Encoder/Decoder

  1. 1Select Encode mode to make text URL-safe, or Decode mode to convert URL-encoded text back
  2. 2Choose between Component encoding (for query parameters) or Full URL encoding
  3. 3Paste your text or URL into the input area
  4. 4The encoded/decoded result appears instantly in the output area
  5. 5Click "Copy Result" to copy the converted text to your clipboard
  6. 6Use the Swap button to quickly reverse the operation

Frequently Asked Questions

When should I use URL encoding?

URL encoding (percent encoding) is essential when including special characters in URLs, especially in query parameters, form data, or API endpoints. Characters like spaces, &, =, ?, and # have special meanings in URLs and must be encoded to prevent parsing errors.

What's the difference between Component and Full URL encoding?

Component encoding (encodeURIComponent) encodes almost all special characters and is perfect for query parameters and form data. Full URL encoding (encodeURI) preserves URL structure characters like :, /, ?, # and only encodes characters that would break the URL format.

Why do spaces become %20 in URLs?

%20 is the percent-encoded representation of a space character. In percent encoding, % is followed by the hexadecimal ASCII code of the character. Space has ASCII code 32, which is 20 in hexadecimal, hence %20.

Can I encode non-English characters in URLs?

Yes, URL encoding properly handles Unicode characters by first converting them to UTF-8 bytes, then percent-encoding each byte. This ensures international characters, emojis, and special symbols work correctly in URLs across all systems.

How do I handle plus signs in form data?

In HTML form data (application/x-www-form-urlencoded), spaces are traditionally encoded as + instead of %20. However, modern web standards prefer %20. Our tool uses standard percent encoding (%20) which works in all contexts.

Need More Developer Tools?

Explore our complete collection of free online developer utilities

View All Tools