FreeQ.One

URL Encoder & Decoder

Encode and decode URLs, query strings, and form data

Plain Text

0 bytes

URL Encoded Output

Enter text to encode

History

No history yet

Encode and decode URLs instantly. Part of the freeq.one tools suite.

About This Tool

URL encoding, also known as percent-encoding, converts characters that are not allowed in URLs into a format that can be safely transmitted over the web. It replaces special characters with a percent sign followed by their two-digit hexadecimal ASCII code. For example, a space becomes %20 and an ampersand (&) becomes %26. This tool lets you encode or decode URL components, query strings, and form data instantly.

URL encoding is essential whenever user input or dynamic data is included in a URL. Without proper encoding, special characters can break the URL structure, cause server errors, or create security vulnerabilities. Modern web frameworks handle much of this automatically, but developers still need to encode and decode manually when debugging APIs, building URL builders, or analyzing traffic logs.

Common Use Cases

  • Encoding special characters in URL query parameters such as spaces, ampersands, and question marks
  • Preparing properly encoded API requests to avoid signature mismatches or invalid endpoints
  • Decoding tracking parameters and UTM tags from marketing URLs for analysis
  • Encoding form data submitted via the application/x-www-form-urlencoded content type
  • Building bookmarklets or shareable URLs that contain JavaScript or complex parameters
  • Debugging encoded URLs found in server access logs or browser developer tools

Pro Tips

  • Encode individual parameter values rather than the entire URL to avoid double-encoding the scheme and host
  • Use encodeURIComponent() for encoding query parameter values in JavaScript
  • Always decode before reading or modifying URL parameters to see the original, human-readable values
  • Watch out for the plus sign (+) — in URL encoding it often represents a space, but in Base64 it is a literal character

Frequently Asked Questions

What characters need to be URL-encoded?
Any character that is not a letter, digit, or one of the reserved safe characters (-, _, ., ~) must be encoded. This includes spaces, ampersands, question marks, hash symbols, slashes, and non-ASCII characters.
What is the difference between encodeURI and encodeURIComponent?
encodeURI() encodes a complete URI while preserving characters that have special meaning in URIs (like :, /, ?, #). encodeURIComponent() encodes everything, including those special characters, making it suitable for encoding individual query parameter values.
Why does %20 represent a space in URLs?
Spaces are not allowed in URLs. The percent-encoding scheme uses %20 because 20 is the hexadecimal ASCII value of the space character. Some systems also accept a plus sign (+) as a space in query string parameters.
Can URL encoding prevent security vulnerabilities?
Proper URL encoding helps prevent injection attacks by ensuring user input is treated as data rather than part of the URL structure. It is an important part of input sanitization but should be combined with other security measures.

Also check out the Base64 Encoder for binary data encoding. Part of the FreeQ.One tools suite.