DevToolHere

How to URL Encode and Decode

URLs cannot contain spaces, non-ASCII characters, or many special symbols directly. URL encoding (percent-encoding) replaces these with %XX sequences. This tool encodes and decodes strings instantly so you can build safe, valid URLs.

Try URL Encode/Decode Now

Free, no signup. Works in your browser.

Open Tool
1

Open the URL Encoder/Decoder

Launch the tool from the Encoding category. The interface has input and output panels with an Encode/Decode toggle, similar to the Base64 tool.

2

Choose Encode or Decode mode

Encode mode converts special characters to percent-encoded format (e.g., space becomes %20, & becomes %26). Decode mode reverses this back to readable text.

3

Enter your text or URL

Paste the string you need to convert. For encoding, enter the raw text with special characters. For decoding, paste the percent-encoded string you received from an API or URL.

4

Select encoding scope

Choose between encoding the full string (encodeURIComponent behavior — encodes everything except letters, digits, and - _ . ~) or URI mode (encodeURI behavior — preserves :, /, ?, #, and other URI structure characters).

5

Copy the result

The encoded or decoded output appears instantly. Copy it to use in query parameters, API requests, redirect URLs, or anywhere that requires properly escaped strings.

Pro Tips

  • *Use encodeURIComponent for query parameter values and encodeURI for complete URLs — mixing them up is a common bug.
  • *Spaces can be encoded as %20 or + in query strings — %20 is always safe, + only works in form data.
  • *Double-encoding (%2520 instead of %20) is a frequent mistake — always decode first if the input might already be encoded.
  • *Non-ASCII characters like emoji are encoded as multi-byte sequences (e.g., UTF-8 bytes each percent-encoded).

Related Guides

Explore all 110+ tools