Calcubes

URL Encode / Decode

Encode URLs or decode URL-encoded strings. Handles special characters and spaces. Useful for API calls, query parameters, and web development. Free online URL encoder decoder.

URL encoder decoder

Result

What is this?

URL encoding (percent encoding) converts special characters to a format safe for URLs. Spaces become %20, & becomes %26, etc. Prevents special characters from breaking URLs or being misinterpreted. Letters, numbers, and some characters (-, _, ., ~) stay unchanged. Encode user input before putting it in query parameters or path segments. Decode when you receive encoded URLs. Encoding the entire URL can break it—typically encode only the dynamic parts. The tool supports both encode and decode modes. Invalid encoded strings may not decode correctly. Essential for web development and API work.

When to use

Use when building URLs with user input, query parameters, or form data. Example: "hello world" → "hello%20world". Encode only the parts with user data, not the whole URL. Developers build dynamic URLs. Handle search queries in URLs. Encode form data for GET requests. Decode URLs from logs or user input. Fix broken links with special characters. Essential for web development. Prevent injection and parsing errors. Test encoding before deploying. Many APIs require encoded parameters.

How to use

Select encode or decode mode and paste your text. Encoding converts special characters to percent-encoded format (%20 for space, etc.). Decoding converts encoded strings back to readable text.

Frequently asked questions

What is URL encoding?
URL encoding (percent encoding) converts special characters to a format safe for URLs. For example, spaces become %20, and special characters like &, #, and ? are encoded.
When do I need to URL encode?
URL encode when including user input in URLs, query parameters, or form data. This prevents special characters from breaking URLs or being misinterpreted by servers.
What characters are encoded?
Spaces, special characters (&, #, ?, =, etc.), and non-ASCII characters are encoded. Letters, numbers, and some safe characters (-, _, ., ~) remain unchanged.
Can I encode entire URLs?
Yes, but typically you only encode the parts that contain user data (like query parameters). Encoding the entire URL can break the URL structure.

Related tools

View all text & formatting