ToolSphere

URL Encode/Decode

More tools

URL encode or decode text and query strings instantly: percent-encoding, spaces as + or %20, or encode every character. Runs in your browser, nothing sent.

Output result

On this browser only

Give feedback

Did this tool help?

Tell us what worked, what didn’t, or what you’d like next.

Opens Google Forms in a new tab with this tool’s name filled in. No sign-in or email required. Feedback is optional.

How to use URL Encode/Decode

  1. 1Select either 'Encode' or 'Decode' mode using the toggle switch.
  2. 2Optionally select encoding options such as converting spaces to '+' or encoding every character.
  3. 3Type or paste your text into the input field.
  4. 4The result will instantly update in the output field. Copy or download the output.

About URL Encode/Decode

What is URL Encoding?

URL Encoding, officially known as percent-encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI) under RFC 3986. The purpose of this encoding is to translate characters that are either reserved or unsafe for transport within an HTTP query or request string into a standardized, universally understood ASCII format.

URIs only allow a small subset of characters to represent paths, parameters, and protocol commands. Any character outside of this subset (such as spaces, brackets, or non-ASCII characters) must be percent-encoded to prevent interpretation conflicts by servers and network routers.

The Difference Between Reserved and Unreserved Characters

In the URI specifications, characters are classified as either reserved or unreserved:

  • Unreserved Characters: These are characters that have no special meaning in a URL and can be transmitted without encoding. They include uppercase and lowercase letters (A-Z, a-z), decimal digits (0-9), and the symbols hyphen (-), underscore (_), period (.), and tilde (~).
  • Reserved Characters: These are characters that have specific structural purposes in a URL (such as separating query fields or declaring protocol schemas). Examples include the colon (:), slash (/), question mark (?), hash (#), ampersand (&), and equals sign (=). If a reserved character is used as part of the data itself (for example, as a password or a search term) rather than a separator, it must be encoded.

When to Use URL Encoding

URL encoding is critical in several web development contexts:

  1. Query String Parameters: When passing user-supplied input to a search query (e.g. ?q=search term), space characters must be converted to %20 or + to maintain correct structure.
  2. Form Data Ingestion: Traditional HTML forms submit values using the application/x-www-form-urlencoded format. This encoding ensures that keys and values containing symbols (like email addresses or complex sentences) are safely transmitted.
  3. Restricting Special Characters: In security contexts, encoding user inputs prevents parameters from breaking URI parsers or triggering injection issues in routing frameworks.

Our URL Encode/Decode tool runs completely client-side in your browser sandbox, ensuring that your secret query strings, credentials, or API routes are never exposed to external servers.

Guides and tutorials

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI is meant to encode a full, functional URL (preserving slashes, colons, and query marks). encodeURIComponent is designed to encode individual query parameter values, converting even path separators and query marks into percent characters.

Why do spaces sometimes turn into '+' instead of '%20'?

Historically, the application/x-www-form-urlencoded media type specified that spaces should be encoded as '+'. Standard percent-encoding (RFC 3986) uses '%20'. Both are widely supported, but '+' is typically reserved for query parameter fields.

Is it safe to pass sensitive data via URL encoding?

No. URL encoding is only a transport formatting scheme, not encryption. Encoded URLs remain visible in server logs and browser histories. Sensitive data should be sent in the request body over HTTPS.

Have a suggestion for URL Encode/Decode?Share your feedback ↗