Developer

URL encoder / decoder

Encode text to URL-safe percent-encoded format or decode any encoded URL back to plain text. Also parses full URLs into scheme, host, path, and query parameters.

Mode:
URL / text
Encoded
Type or paste text or a URL to encode.
Everything runs in your browser. Nothing is sent to any server.

What is URL encoding?

URL encoding (percent-encoding) replaces unsafe characters in URLs with a percent sign followed by their hex value. Spaces become %20, ampersands become %26, and non-ASCII characters like Japanese text get multi-byte encodings. This ensures URLs are valid and parseable by browsers and servers. The URL parser below the encoder breaks down any URL into its components for easy inspection.

encodeURI vs encodeURIComponent

encodeURI() encodes a full URL but preserves characters that are valid URL syntax (://?#&=). encodeURIComponent() encodes everything except A-Z, a-z, 0-9, and a few symbols (-_.!~*'()). Use encodeURIComponent() for individual parameter values and encodeURI() for complete URLs. This tool supports both modes.

URL parsing

The parser below the encoder breaks any URL into its components: protocol, host, port, path, query parameters, and fragment. Each query parameter is shown as a key-value pair. Useful for debugging API endpoints, verifying redirect URLs, and understanding complex query strings at a glance.

For Base64 encoding, use our Base64 encoder / decoder.

Common Uses

  • Query string construction: Encode user-supplied search terms, filters, or form inputs before appending them to a URL to prevent injection and broken requests.
  • Webhook and redirect URL building: Encode the callback URL parameter in OAuth and webhook flows so it survives safe transfer through third-party redirect chains.
  • Email campaign link tracking: Encode UTM parameters and destination URLs inside tracking links to ensure email clients don't break them.
  • API endpoint debugging: Decode a percent-encoded URL from a server log or error message to read the original parameters in human-readable form.
  • Internationalised URL creation: Encode non-ASCII characters (accented letters, Chinese, Arabic, Hindi) in URLs for use in international web applications.
  • File path URL encoding: Encode file names containing spaces or special characters so they work correctly as URL path segments.
  • Social media link sharing: Encode URLs before embedding them in social media meta tags to prevent platforms from stripping or misinterpreting parameters.

FAQ

Why do spaces become %20 in URLs?

Space is not a valid URL character — URLs are restricted to a safe subset of ASCII. %20 is the percent-encoded form of space (0x20 in ASCII). In HTML form submissions with application/x-www-form-urlencoded, spaces may also appear as + characters, but %20 is the standard inside a URL path or query value.

What's the difference between URL encoding and Base64?

URL encoding makes text URL-safe by escaping special characters — it's primarily for compatibility with URL syntax. Base64 converts binary data to ASCII text, primarily for transmitting binary through text-only channels. They're different tools for different problems, though you sometimes combine them (Base64 first, then URL-encode).

Do I need to encode the entire URL or just the parameters?

Usually just the parameters. Use "Encode component" mode for individual query values (the default). Use "Encode full URL" only when you're working with a URL that contains non-ASCII characters in the path or hostname and need to escape them while keeping the URL structure intact.

Does the URL encoder send my data anywhere?

No. All encoding and decoding runs entirely in your browser. Your URLs and text data never leave your device.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL and preserves characters like /, :, and ? that have URL structure meaning. encodeURIComponent encodes a single value and replaces those characters too — use it for individual query string values.

By the Numbers

Sources & Further Reading

01
Runs on your device
Files never leave your browser. No server uploads.
02
8 languages
EN, ES, HI, PT, FR, DE, ID, JA — every tool.
03
No signup
Open the page, use the tool. That's it.