logo
logo

URL Encode & Decode

Encode and decode URLs online for free. Convert special characters to URL-safe format and back. Essential tool for web developers!

URL Encoder & Decoder

Encode special characters for URLs or decode URL-encoded strings

Free URL Encode & Decode Online - URL Encoder/Decoder

Encode and decode URLs online for free. Convert special characters to URL-safe format (percent-encoding) and back—essential for web developers, SEO specialists, and anyone working with URLs. No signup required.

What Is URL Encoding?

URL encoding (also called percent-encoding) converts special characters into a format safe for URLs. Since URLs can only contain a limited set of ASCII characters, any other characters must be represented as percent-encoded sequences.

For example:

  • Space → %20
  • &%26
  • ?%3F
  • Non-ASCII characters → UTF-8 byte sequences

How to Use

Encoding

  1. Enter your URL or text - Paste content with special characters
  2. Click "Encode" - Convert to URL-safe format
  3. Copy result - Use the encoded string in URLs

Decoding

  1. Paste encoded URL - Enter percent-encoded string
  2. Click "Decode" - Convert back to readable text
  3. View result - See the original content

Key Features

  • Instant conversion - Real-time encoding/decoding
  • Full Unicode support - Handles international characters
  • Preserve structure - Optionally encode/skip certain characters
  • No limits - Process any URL length
  • Privacy-first - All processing in your browser
  • One-click copy - Easy clipboard access

Why URL Encoding Is Necessary

URLs have a strict syntax defined by RFC 3986. Only these characters are safe in URLs:

Unreserved Characters (Never Encoded)

A-Z a-z 0-9 - _ . ~

Reserved Characters (Special Meaning)

! # $ & ' ( ) * + , / : ; = ? @ [ ]

Unsafe Characters (Must Be Encoded)

  • Spaces → %20 or +
  • < >%3C %3E
  • { }%7B %7D
  • | \%7C %5C
  • ^ ~%5E %7E
  • International characters → UTF-8 bytes

Common Encoding Examples

CharacterEncodedDescription
(space)%20Most common
&%26Query separator
=%3DKey-value delimiter
?%3FQuery string start
/%2FPath separator
#%23Fragment identifier
+%2BPlus sign
@%40At symbol
%%25Percent sign itself

Use Cases

Web Development

  • API parameters - Encode query string values
  • Form submissions - Handle special characters
  • Link building - Create valid URLs
  • Redirect URLs - Encode callback URLs
  • Analytics tracking - UTM parameters

SEO & Marketing

  • UTM tracking - Encode campaign parameters
  • Redirect chains - Safe URL passing
  • Dynamic URLs - Clean URL generation
  • Social sharing - Encode share URLs
  • URL shorteners - Original URL encoding

Data Operations

  • API requests - Proper parameter encoding
  • OAuth flows - Redirect URI handling
  • Webhook URLs - Secure callback patterns
  • File downloads - Handle filenames with spaces
  • Search queries - Pass search terms in URLs

Debugging

  • Test API calls - Verify encoding
  • Debug redirects - Decode nested URLs
  • Analyze failures - Find encoding issues
  • Review logs - Decipher encoded URLs

Understanding Encoding Depth

Sometimes URLs are encoded multiple times:

Single Encoding

Hello WorldHello%20World

Double Encoding (Problematic)

Hello%20WorldHello%2520World

If you decode and see % characters still, the URL was double-encoded.

URL Components and Encoding

https://example.com/path/to/page?query=value&foo=bar#section
\___/   \_________/\___________/ \_________________/ \_____/
scheme    host         path          query string     fragment

Each component has different encoding rules:

  • Path: Encode most special characters
  • Query string values: Encode &, =, spaces
  • Fragment: Generally treated like query string

JavaScript Encoding Functions

FunctionPurposeExample
encodeURIComponent()Encode query parametersMost common use
encodeURI()Encode full URL (preserves structure)Less aggressive
escape()DeprecatedDon't use

Frequently Asked Questions

What's the difference between encoding and encrypting?

URL encoding is for format compatibility, not security. Anyone can decode it. Encryption protects data from unauthorized access.

Should I encode the entire URL?

No! Only encode the parts that contain special characters—typically query string values, path segments with special characters, or fragment identifiers.

Why is my URL not working after encoding?

Common issues:

  • Double encoding (encoding already-encoded URLs)
  • Using wrong encoding function
  • Encoding parts that shouldn't be encoded (like ://)

What's the difference between %20 and +?

Both represent spaces. %20 is standard percent-encoding. + is used in application/x-www-form-urlencoded (form submissions). Modern practice prefers %20.

How do I handle international characters?

International characters are first converted to UTF-8 bytes, then each byte is percent-encoded. Example: %E6%97%A5

Can I encode/decode entire URLs at once?

Be careful—encoding reserved characters like :// breaks URL structure. Encode only the values/segments that need it.