URL Encoder & Decoder Online

Encode or decode URLs and query string parameters. Handles special characters, spaces, and unicode.

What is URL Encoding?

URL encoding (percent-encoding) replaces unsafe characters with a "%" followed by two hexadecimal digits. For example, a space becomes %20 and an ampersand becomes %26. This ensures URLs are transmitted correctly over the internet.

encodeURI vs encodeURIComponent

encodeURIComponent encodes everything except letters, digits, and a few special characters. Use it for query string values. encodeURI preserves characters that are part of a valid URL structure (like :, /, ?, #). Use it for full URLs.

About This Tool

The URL Encoder/Decoder converts special characters in URLs to their percent-encoded equivalents and decodes percent-encoded strings back to readable text. URL encoding is essential for safely transmitting data through query strings, form submissions, and REST API parameters.

Key Features

  • Encode URL Components — Converts spaces, special characters, and non-ASCII text to percent-encoded sequences safe for use in query strings and URI components.
  • Decode Percent-Encoded URLs — Converts %XX sequences back to their original characters so you can read the actual content of encoded URLs and query parameters.
  • Swap Direction — Toggle between Encode and Decode mode instantly with the Swap button for quick round-trip testing of URL values.
  • Browser-Based Processing — All operations run locally in your browser. Your data never leaves your device.
  • Free & No Signup — Use this tool as many times as you need without creating an account or paying anything.

Common Use Cases

  • Encoding user-entered search queries before appending them to API request URLs as query parameters
  • Decoding percent-encoded URLs in browser network logs to read the actual parameter values passed
  • Fixing broken URLs containing spaces or special characters in HTML href attributes
  • Encoding OAuth redirect URIs and callback URLs that contain slashes and colons
  • Decoding obfuscated tracking URLs in marketing emails to see the actual destination

How to Use

Select Encode or Decode mode with the toggle at the top. Paste your URL or text into the input field and click the action button. The encoded or decoded result appears instantly in the output area. Use the Copy button to copy the result to your clipboard.

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL, leaving structural characters like /, ?, and # intact. encodeURIComponent encodes every special character, making it suitable for individual query parameter values. This tool uses the component encoding.

Why does a space become %20 or +?

%20 is the standard percent-encoding of a space (RFC 3986). The + sign represents a space in the older application/x-www-form-urlencoded format used by HTML forms. Both decode to a space character.

Can I encode an entire URL at once?

You can paste a full URL but only the parts that need encoding (query values, path segments with special characters) should be encoded. Encoding the entire URL including the protocol and slashes will break it.

Does URL encoding support Unicode characters?

Yes. Non-ASCII characters like accented letters and emoji are first UTF-8 encoded, then each byte is percent-encoded. For example, the euro sign € becomes %E2%82%AC.