URL Encoder / Decoder
Encode and decode URLs online. Convert special characters to URL-safe format for use in web addresses and API calls.
Input
Output
Common Use Cases
Email Address
user@example.com
Query with Spaces
hello world test
Special Characters
!@#$%^&*()+=[]{}|;:'",.<>?
URL with Parameters
https://example.com?name=John Doe&age=30
International Text
Hello 世界 مرحبا мир
File Path
/path/to/file name.txt
JSON String
{"name": "John", "age": 30}
HTML Content
<div class="test">Hello & Goodbye</div>
Web Safe
Convert special characters to URL-safe format for use in web addresses
Multiple Methods
Choose between standard, full URI, or custom encoding methods
Character Analysis
See exactly which characters need encoding and their encoded values
Query Builder
Parse and build query strings with automatic parameter encoding
When to Use URL Encoding
Query Parameters
Encode values passed in URL query strings to handle spaces and special characters
Form Data
When submitting forms with application/x-www-form-urlencoded content type
API Calls
Encode parameters in REST API URLs to ensure proper transmission
File Paths
Handle spaces and special characters in file paths within URLs
Code Examples
JavaScript
// Encode
encodeURIComponent('hello world') // "hello%20world"
// Decode
decodeURIComponent('hello%20world') // "hello world"Python
import urllib.parse
# Encode
urllib.parse.quote('hello world') # "hello%20world"
# Decode
urllib.parse.unquote('hello%20world') # "hello world"PHP
// Encode
urlencode('hello world'); // "hello+world"
rawurlencode('hello world'); // "hello%20world"
// Decode
urldecode('hello%20world'); // "hello world"Frequently Asked Questions
What's the difference between encodeURI and encodeURIComponent?
encodeURI() is used to encode complete URIs and preserves characters that are valid in URIs (like :, /, ?, #).encodeURIComponent() encodes all special characters and is used for encoding individual URI components like query parameter values. Use encodeURIComponent for query string values and encodeURI for complete URLs.Why do spaces become %20 or +?
Which characters need to be encoded?
How do I handle Unicode/international characters?
Free URL Encoder & Decoder Online
URLs can only contain a limited set of characters from the ASCII character set. Special characters like spaces, ampersands, equals signs, and non-ASCII characters must be percent-encoded (also called URL encoding) to be safely transmitted in a URL. Our free URL encoder converts any text into a properly encoded URL-safe string, and our decoder reverses the process instantly.
Whether you're encoding a query parameter value, decoding a URL you received from an API, or working with internationalized domain names and Unicode paths, this tool handles it all — right in your browser with no data sent to any server.
How to Encode or Decode a URL
- 1
Paste your text or URL
Enter the string you want to encode or decode into the input field. You can paste a full URL, a query string, or just a parameter value.
- 2
Choose encode or decode
Select whether you want to URL-encode (convert special chars to %XX format) or URL-decode (convert %XX back to readable text).
- 3
Select encoding type
Choose between encodeURIComponent (for query parameter values) or encodeURI (for full URLs). encodeURIComponent is the most common choice.
- 4
Copy the result
The encoded or decoded output appears instantly. Click the copy button to grab it for use in your code, browser, or API request.
When to Use URL Encoding
API Query Parameters
When building API requests, parameter values containing &, =, +, or spaces must be encoded to avoid breaking the query string structure.
Form Submissions
HTML forms URL-encode field values automatically, but when building query strings manually in JavaScript, you must encode values yourself.
Redirect URLs
When passing a URL as a parameter to another URL (e.g., a login redirect), the inner URL must be fully encoded to avoid ambiguity.
Internationalization
URLs with non-ASCII characters (Japanese, Arabic, emoji, accented letters) must be percent-encoded for compatibility with all HTTP clients.
Debugging API Calls
Decode percent-encoded URLs from server logs, error messages, or API responses to read them in plain text.
OAuth & Authentication
OAuth 1.0 and many security protocols require precise URL encoding of query parameters to generate valid signatures.
Frequently Asked Questions
What is the difference between encodeURI and encodeURIComponent?
What characters get percent-encoded?
Why does a space sometimes become + instead of %20?
Is URL encoding the same as HTML encoding?
Can I URL-encode an entire URL?
URL Encoding Reference
Common percent-encoded characters: space = %20, ! = %21, " = %22, # = %23, $ = %24, % = %25, & = %26, ' = %27, ( = %28, ) = %29, * = %2A, + = %2B, , = %2C, / = %2F, : = %3A, ; = %3B, = = %3D, ? = %3F, @ = %40, [ = %5B, ] = %5D.
Popular searches: url encoder decoder online • percent encoding tool • encode url online free • decode url online • query string encoder • uri encoder online • url special characters encode • url encode space • url decode online tool