URL Encoder / Decoder
URL Input
Paste URL or text to encode/decode
Settings
Paste URL and click Encode or Decode
Let us know
Please share your experience
Similar Tools
About URL Encoder / Decoder
Encode and decode URLs online. Supports full URL and component encoding. Free tool with URL parsing and reference table.
How to Use
Step 1
Select conversion mode: Encode or Decode
Step 2
Choose encoding type: Full URL or URL Component
Step 3
Paste your URL or text into the input field
Step 4
Load examples to see different URL formats
Step 5
Click 'Reference' to view URL encoding table
Step 6
Click 'Encode' or 'Decode' to convert
Step 7
View URL components breakdown (protocol, hostname, path, query, hash)
Step 8
Copy the output to use in your project
Features & Benefits
- ✅Bidirectional conversion: Encode ↔ Decode
- ✅Two encoding modes: Full URL and URL Component
- ✅Full URL mode: encodes spaces and special characters, preserves URL structure
- ✅Component mode: encodes all special characters including / : ? # & =
- ✅URL parser shows protocol, hostname, port, path, query, hash
- ✅Encoding reference table with 20+ special characters
- ✅5 URL examples: basic, query parameters, special characters, encoded, international
- ✅Handles international characters (UTF-8)
- ✅One-click copy to clipboard
- ✅Mode switcher for quick conversion direction change
- ✅Real-time conversion
- ✅Detailed error messages for invalid encoding
- ✅100% browser-based - URLs never sent to server
- ✅100% free - no limits, no signup required
FAQs
What is URL encoding?
URL encoding (percent encoding) converts special characters to a format that can be safely transmitted in URLs. Characters are replaced with % followed by two hexadecimal digits. For example, space becomes %20, & becomes %26. This ensures URLs work correctly across all systems and browsers.
What's the difference between Full URL and URL Component?
Full URL (encodeURI) preserves URL structure characters like :, /, ?, #, &, = while encoding spaces and other special characters. Use for complete URLs. URL Component (encodeURIComponent) encodes ALL special characters including URL structure. Use for query parameters, path segments, or any text that will be part of a URL.
When should I use Full URL encoding?
Use Full URL encoding when you have a complete URL that you want to make safe for transmission while preserving its structure. For example: https://example.com/search?q=hello world becomes https://example.com/search?q=hello%20world. The URL structure (://?=) is preserved.
When should I use URL Component encoding?
Use URL Component encoding for individual parts of a URL: query parameter values, path segments, or any user input that will be inserted into a URL. For example, if a user searches for 'price>100', encode it as price%3E100 before adding to ?q=. This prevents breaking the URL structure.
Why do spaces become %20?
In URL encoding, space (ASCII 32, hex 20) becomes %20. Some systems also accept + for spaces in query strings, but %20 is the standard percent encoding. Our tool uses %20 for consistency and universal compatibility.
Can I encode international characters?
Yes! The encoder handles UTF-8 characters correctly. For example, café becomes caf%C3%A9, 日本語 becomes %E6%97%A5%E6%9C%AC%E8%AA%9E. International characters are converted to UTF-8 bytes, then each byte is percent-encoded.
What characters need to be encoded?
Reserved characters that have special meaning in URLs must be encoded: : / ? # [ ] @ ! $ & ' ( ) * + , ; =. Additionally, spaces and non-ASCII characters should be encoded. The encoding reference table shows common characters and their encoded forms.
Why does my URL have %2F instead of /?
If you used URL Component encoding on a full URL, / gets encoded to %2F. This is correct for component encoding but breaks the URL structure. Use Full URL encoding for complete URLs, or only encode the specific parts (like query values) that need it.
What are the URL components?
A URL has several parts: Protocol (https:), Hostname (example.com), Port (:8080, optional), Path (/search), Query (?q=test), and Hash (#section). Our parser breaks down URLs to show each component, helping you understand URL structure.
Can I decode already-encoded URLs?
Yes! Paste an encoded URL (with %20, %3A, etc.) and click Decode to convert it back to readable text. The decoder handles both Full URL and Component encoding. If decoding fails, you'll see an error message indicating invalid encoding.
Is my URL data secure?
Yes! All encoding and decoding happens entirely in your browser using JavaScript's built-in encodeURI/decodeURI and encodeURIComponent/decodeURIComponent functions. Your URLs never leave your device and are not sent to any server, ensuring complete privacy.