URL Encoder/Decoder Online - Encode & Decode URLs

%
DevDen URL Encode
Mode:
URL-encoded output will appear here

URL Encoder & Decoder Online

Encode text for safe use in URLs or decode percent-encoded strings instantly with this free online tool. Features smart auto-detection, URL component breakdown, and query string parsing. All processing happens in your browser — your data never leaves your device.

URL encoding (also called percent-encoding) converts characters into a format safe for URLs. Special characters like spaces, ampersands, and non-ASCII characters are replaced with a percent sign followed by two hexadecimal digits (e.g., space becomes %20). This ensures URLs work correctly across all browsers and servers, as URLs can only contain a limited set of ASCII characters.

  • Query Parameters — Encode user input before adding to URL query strings (e.g., search terms, form data).
  • API Requests — Encode special characters in API endpoints and parameters to prevent errors.
  • Debugging — Decode URLs from logs, analytics, or error messages to see the original values.
  • Deep Links — Encode URLs that need to be passed as parameters to other URLs.
  • OAuth & Auth Flows — Encode redirect URLs and callback parameters.
  • Form Submissions — Understand how form data is encoded in application/x-www-form-urlencoded format.

Working with URL encoding in your code? Here's how to encode and decode in popular languages:

  • Instant encode/decode as you type
  • Smart auto-detection of input type
  • URL component breakdown (protocol, host, path, query, fragment)
  • Query string parser (key=value pairs)
  • Keyboard shortcuts (E, D, A)
  • 100% client-side processing
  • No ads, no signup required
  • Copy output with one click
  • Remembers your last input
  • Mobile responsive design
How do I URL encode text?

Enter your text in the input panel. If auto-detect mode is enabled, the tool will recognize it as plain text and encode it automatically. You can also manually select "Encode" mode using the toggle or press 'E' on your keyboard.

What's the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes all special characters, making it safe for query parameter values. encodeURI preserves URL structure characters (like :, /, ?) so you can encode a full URL without breaking it. This tool uses encodeURIComponent behavior, which is more common for encoding individual values.

Why do spaces become %20 or +?

Both represent spaces in URLs, but they come from different standards. %20 follows RFC 3986 (URI standard), while + follows the application/x-www-form-urlencoded format used by HTML forms. Most servers accept both, but %20 is the safer choice for general URL encoding.

Which characters need to be encoded?

Reserved characters that have special meaning in URLs must be encoded when used as data: ! # $ & ' ( ) * + , / : ; = ? @ [ ]. Unsafe characters like spaces, < > | \ and non-ASCII characters also need encoding. Only unreserved characters (A-Z, a-z, 0-9, - _ . ~) are safe without encoding.

Is my data private?

Yes. All encoding and decoding happens entirely in your browser using JavaScript. No data is ever sent to any server. Your last input and mode preference are saved in your browser's localStorage for convenience.

Instant conversion · Auto-detect mode · URL component breakdown · Query string parser · 100% private

Encode text for URLs or decode percent-encoded strings online. Fast, free, and built for developers.