URL Encode/Decode
Encode and decode URLs for web development. Convert special characters to URL-safe format and back.
What It Does
URL Encoder/Decoder (also called Percent Encoder) converts text into URL-safe format by encoding special characters as percent-encoded sequences, and decodes encoded URLs back to readable text. URL encoding (percent encoding) is essential because URLs can only contain a limited set of characters safely: letters, digits, and a few special characters like hyphens and underscores. Characters like spaces, ampersands, equals signs, and non-ASCII characters must be encoded as percent sequences (e.g., space becomes %20, & becomes %26). This tool handles encoding for query parameters, path segments, fragment identifiers, and entire URLs. It properly encodes spaces, special characters, Unicode characters, and reserved URL characters. Essential for web development, API integration, form submissions, OAuth callbacks, and any scenario where user input or dynamic data needs to be safely included in URLs without breaking URL structure or causing security issues.
Key Features:
- URL encoding: Convert special characters to percent-encoded format (%20, %26, etc.)
- URL decoding: Convert percent-encoded URLs back to readable text
- Query parameter handling: Properly encode values for URL query strings
- Unicode support: Encode international characters and emoji
- Full URL encoding: Encode entire URLs or just specific parts
- Reserved character handling: Encode characters with special URL meanings
- Instant conversion: Real-time encoding/decoding as you type
- Copy functionality: One-click copy of encoded/decoded results
How To Use
Paste your URL or text, choose encode or decode, and get instant results. Perfect for API development, form handling, and URL construction.
Enter URL or Text
Paste the URL or text you want to encode or decode into the input field. For encoding: Enter text with special characters, spaces, or Unicode characters that need to be URL-safe. For decoding: Paste a URL or string containing percent-encoded sequences (like %20, %26, %3D).
Choose Encode or Decode
Click "Encode URL" to convert special characters to percent-encoded format (e.g., "hello world" becomes "hello%20world"). Click "Decode URL" to convert percent-encoded sequences back to readable characters (e.g., "hello%20world" becomes "hello world").
View Results
The encoded or decoded result appears instantly. Encoded URLs are safe to use in web browsers, API requests, or anywhere URLs are required. Decoded text shows the original readable content.
Copy and Use
Click the copy button to copy the result to your clipboard. Use encoded URLs in API requests, HTML links, or query parameters. Use decoded text to understand what encoded URLs actually contain.
Pro Tips
- •Always encode user input before adding to URLs to prevent injection attacks
- •Spaces become %20, but + is also accepted for spaces in query strings
- •Reserved characters like &, =, ?, # have special meanings and should be encoded
- •Unicode characters are encoded as UTF-8 bytes then percent-encoded
- •Already encoded URLs can be decoded to see their readable form
- •Different URL parts (path, query, fragment) may need different encoding rules
Benefits
Use Cases
API Query Parameters
Encode query parameter values in API requests. Example: Search query "coffee & tea" must be encoded as "coffee%20%26%20tea" in URL: https://api.example.com/search?q=coffee%20%26%20tea. Without encoding, the & character would be interpreted as a parameter separator, breaking the URL. Essential for all API integrations.
Query: "coffee & tea" → Encoded: "coffee%20%26%20tea"Form Data in URLs
Encode form data when submitting via GET method. Example: Form with name="John Doe" and email="john@example.com" becomes: ?name=John%20Doe&email=john%40example.com. The space becomes %20, @ becomes %40. Essential for URL-based form submissions and search functionality.
Form data → URL: ?name=John%20Doe&email=john%40example.comOAuth Callback URLs
Encode OAuth callback URLs and state parameters. Example: Callback URL with state parameter must be encoded: https://app.com/callback?state=encoded_state_value. OAuth providers require proper URL encoding for security and parameter handling.
Callback: /callback?state=user%3D123%26return%3DhomeInternational URLs
Encode Unicode characters in URLs. Example: URL with Chinese characters "搜索" is encoded as "%E6%90%9C%E7%B4%A2". Unicode characters are first converted to UTF-8 bytes, then percent-encoded. Essential for international websites and multilingual content.
Chinese: "搜索" → Encoded: "%E6%90%9C%E7%B4%A2"Frequently Asked Questions
1 What characters need to be URL encoded?
2 What's the difference between encoding the whole URL vs just parts?
3 Why does my encoded URL look different in the browser?
4 Can I encode already-encoded URLs?
5 How are Unicode characters encoded in URLs?
Related Tools
Base64 Encode/Decode
Encode text to Base64 or decode Base64 strings. Essential for data transmission, APIs, and web development.
Text Case Converters
Convert text to uppercase, lowercase, title case, camelCase, snake_case, and more. Perfect for formatting code, titles, and content.
Timestamp Converter
Convert between Unix timestamps and human-readable dates. Support for milliseconds and multiple time zones.
Number Base Converter
Convert numbers between binary, decimal, hexadecimal, and octal. Essential tool for programming and computer science.
JSON to CSV Converter
Convert JSON arrays to clean CSV with headers and custom delimiters.
CSV to JSON Converter
Turn CSV rows into JSON arrays with optional headers and pretty formatting.