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 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.
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.
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.
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).
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
How to Encode and Decode Base64
Quickly encode text or files to Base64 and decode Base64 strings back to plain text. Works entirely in the browser with no server upload.
How to Test Regular Expressions Online
Test and debug regex patterns with real-time matching, group highlighting, and a cheat sheet. Supports JavaScript, Python, and Go flavors.
How to Generate QR Codes Online
Generate QR codes for URLs, text, Wi-Fi credentials, vCards, and more. Customize colors, size, and error correction level. Download as PNG or SVG.