ToolsWise.com

URL Encoder & Decoder

Text to URL Encoder

URL to Text Decoder

URL Encoder & Decoder Online — Free Percent Encoding Tool

Encode and decode URLs instantly with our free online tool. Convert special characters, spaces, and non-ASCII text into valid percent-encoded URL format — or decode them back to readable text.

What is URL Encoding?

URL encoding, also known as percent-encoding, is a mechanism defined by RFC 3986 for representing characters in a Uniform Resource Identifier (URI). URLs can only contain a limited set of ASCII characters — letters, digits, and a few special symbols. Any character outside this set must be encoded before it can be safely included in a URL.

Characters are divided into unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) that can appear in a URL without encoding, and reserved characters (such as :, /, ?, #, @, &, =) that carry special meaning in URL syntax. When reserved characters need to be used as literal data rather than delimiters, they must be percent-encoded as %XX, where XX is the two-digit hexadecimal representation of the character's byte value.

Features

Encode & Decode URLs

Switch between encoding and decoding modes. Convert raw URLs into percent-encoded strings or decode them back to readable text.

Real-Time Conversion

Results update instantly as you type. No submit buttons or page reloads — conversion happens live in your browser.

Component Encoding

Use encodeURIComponent-style encoding for individual parameters, ensuring query strings are properly escaped.

Special Character Handling

Correctly encodes spaces, ampersands, hash symbols, and all reserved characters so URLs remain valid across browsers.

Query String Support

Handle complex query strings with multiple key-value pairs while preserving URL structure and separators.

Copy & Download

Copy encoded or decoded results to your clipboard instantly, or download as a text file for your workflow.

How to Encode and Decode URLs

1

Paste a URL or Text to Encode

Enter any URL, query string, or plain text that contains special characters into the input field. The tool accepts full URLs, individual parameters, or raw text.

2

Choose Encode or Decode Mode

Select whether you want to encode special characters into percent-encoded format, or decode an already-encoded URL back into readable text.

3

Copy the Encoded or Decoded Result

The output appears instantly. Copy the result to your clipboard or download it as a file to use in your application, API request, or browser address bar.

URL Reserved Characters

These characters have special meaning in URL syntax and must be percent-encoded when used as literal data.

CharacterEncodedDescription
Space%20Whitespace separator
!%21Exclamation mark
#%23Fragment identifier
$%24Dollar sign
&%26Query separator
'%27Apostrophe
(%28Opening parenthesis
)%29Closing parenthesis
*%2AAsterisk
+%2BPlus sign
,%2CComma
/%2FPath separator
:%3AScheme separator
;%3BParameter delimiter
=%3DKey-value separator
?%3FQuery string start
@%40User info separator

Common Use Cases

  • Query Parameters in URLs: Encode user input, search terms, and filter values before appending them to a URL so special characters do not break the query string.
  • API Requests with Special Characters: Ensure API endpoints receive correctly formatted parameters, especially when values contain ampersands, equals signs, or non-ASCII characters.
  • Form Submissions: Encode form data before sending it via GET or POST requests to prevent data corruption and ensure correct server interpretation.
  • Redirect URLs: Encode callback and redirect URLs passed as parameters within another URL, avoiding conflicts between outer and inner URL structures.
  • Internationalized Domain Names (IDN): Encode non-Latin characters such as Chinese, Arabic, or Cyrillic scripts into ASCII-compatible representations for domain names.

Frequently Asked Questions

Why do URLs need to be encoded?

URLs are transmitted over protocols that only support a limited set of ASCII characters. Characters like spaces, ampersands, and non-Latin scripts cannot appear in a URL directly. Encoding converts them into a safe percent-encoded format that all web servers and browsers can interpret consistently.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URI while preserving characters that have structural meaning (such as ://?#&=). encodeURIComponent encodes everything except unreserved characters, making it ideal for encoding individual query parameter values where those reserved characters should be treated as literal data.

What does %20 mean in a URL?

%20 is the percent-encoded representation of a space character. Since spaces are not allowed in URLs, they are replaced with %20 (the hexadecimal value of the space character's ASCII code, which is 32 in decimal or 20 in hex). You may also see the + symbol used to represent spaces in query strings.

Should I encode the entire URL or just parameters?

In most cases you should only encode the parameter values, not the entire URL. Encoding the full URL would escape structural characters like :// and / that are needed for the URL to function. Use encodeURIComponent on individual values and encodeURI only when you need to sanitize a complete URI.

How do I handle special characters in URLs?

Identify which parts of the URL contain user-supplied or dynamic data, then apply percent-encoding to those segments. Use JavaScript's built-in encodeURIComponent function for individual parameter values, or paste the text into our tool to encode it automatically. Always decode on the receiving end to restore the original characters.

Related Tools

Explore more encoding, formatting, and security tools to complement your development workflow.