URL Encoder & Decoder – Percent-Encode Links & Query Params
Encode entire URLs or individual components with configurable space handling, plus decode percent-encoded strings for safe API links.
URL Encoder/Decoder
Encode/decode URLs and URI components
lightbulbPopular Use Cases
Encode/decode URL query strings with special characters
Encode path parameters and special characters for APIs
Decode URL-encoded search queries
Encode form submission data for POST requests
Encoded URL will appear here
Example Inputs
Hello, World!
Hello%2C%20World%21
https://example.com/search?q=hello world&filter=active
Keyboard Shortcuts
keyboardShow shortcutsexpand_more
Related tools
Show moreShow more
› About this tool · FAQ
Stop debugging broken URLs because of unescaped spaces and special characters. This tool properly encodes URLs and query parameters so they actually work in browsers and APIs. Handles the space encoding choice (+ vs %20) and knows the difference between full URLs and URL components.
How do I encode a URL online?
Paste your URL or text into the encoder, select Component mode for query parameters or URI mode for full URLs, choose your space encoding preference (+ or %20), then click Encode. Copy the encoded result to use in web applications, APIs, or links.
What is percent encoding?
Percent encoding (also called URL encoding) replaces unsafe characters with a percent sign (%) followed by two hexadecimal digits. For example, space becomes %20, and & becomes %26. This ensures URLs can be safely transmitted over the internet.
What is URL encoding?
URL encoding (percent encoding) converts characters into a format that can be safely transmitted over the internet by replacing unsafe characters with % followed by hex codes.
When should I use encodeURI vs encodeURIComponent?
Use encodeURI for complete URLs to preserve the URL structure. Use encodeURIComponent for individual parameters or components that may contain reserved characters.
Should spaces be encoded as + or %20?
In query parameters, spaces can be + or %20. In URL paths and most other contexts, use %20. The + encoding is specific to application/x-www-form-urlencoded format.
Are there characters that don't need encoding?
Yes, unreserved characters (A-Z, a-z, 0-9, -, ., _, ~) don't need encoding. Reserved characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) may need encoding depending on context.
How do I encode URLs online safely?
Use our URL encoder tool to safely encode URLs and query parameters. All encoding happens in your browser - no URLs are sent to servers, ensuring privacy for sensitive links and API endpoints.
What characters need to be URL encoded?
Special characters like spaces, &, =, ?, #, %, +, and non-ASCII characters must be URL encoded. Our tool automatically identifies and encodes these characters with their percent-encoded equivalents.
How do I decode URL encoded strings?
Switch to "Decode" mode and paste your URL-encoded string. The tool will convert percent-encoded characters (%20, %21, etc.) back to their original form, making URLs human-readable.
Why do I see %20 instead of spaces in URLs?
%20 is the URL-encoded representation of a space character. URLs cannot contain literal spaces, so they must be encoded as %20 or sometimes + in query parameters.
Can I encode query parameters separately?
Yes, use the "Component" mode to encode individual query parameters or URL components. This is essential when parameter values contain special characters like &, =, or #.
What's the difference between URL encoding and HTML encoding?
URL encoding uses percent signs (%) for web addresses and HTTP requests. HTML encoding uses ampersand entities (&) for displaying content in web pages. Use the appropriate encoding for your context.
How do I fix "Invalid URL" errors?
Invalid URL errors often occur due to unencoded special characters. Use our URL encoder to properly encode your URLs, especially query parameters and path components with special characters.
Can I encode non-English characters in URLs?
Yes, the tool supports UTF-8 encoding for international characters, emojis, and symbols. Non-ASCII characters are automatically converted to their percent-encoded form for URL compatibility.
What are common URL encoding mistakes?
Common mistakes include: not encoding query parameters, double-encoding URLs, using + for spaces in paths (should be %20), and not encoding special characters in form data.
How do I encode URLs for API requests?
For API requests, encode query parameters using "Component" mode to ensure special characters don't break the URL structure. This is crucial for search queries, user input, and dynamic parameters.