URL Encode
URL-encode text online. Percent-encode special characters for safe use in URLs, query strings, and form data.
💡 Enter text → get URL-encoded. Example: "hello world" → "hello%20world".
How to URL Encode Text
Step-by-step guide with examples
What is URL Encoding?
URL encoding (percent-encoding) replaces unsafe characters in URLs with a % followed by two hex digits. For example, a space becomes %20. This ensures URLs are valid and special characters are transmitted correctly.
How URL Encoding Works
1. Identify characters that are not URL-safe (spaces, &, =, ?, #, etc.). 2. Convert each unsafe character to its UTF-8 byte sequence. 3. Replace each byte with %XX where XX is the hex value. Example: "hello world" → "hello%20world" "name=John&age=30" → "name%3DJohn%26age%3D30"
When to Use URL Encoding
• Building query strings with user input. • Passing special characters in URL parameters. • Encoding form data (application/x-www-form-urlencoded). • Creating safe redirect URLs. • Encoding file paths with spaces or special characters.
Frequently Asked Questions
3 common questions answered
Q1What is URL encoding?
Q2What characters need URL encoding?
Q3What is the difference between URL encode and HTML encode?
Related Conversion Tools
Explore 6 similar converters
Explore All Tool Categories
Browse our complete collection of 54 converters & guides