URL Encode Text

Convert text into a safe format for web addresses. Replaces unsafe characters with % percent-encoding.

Input Text

Settings

Live Statistics

Length Change0 chars
StatusValid
Encoded Result
0 chars
Result will appear here...

What is URL Encoding?

URL Encoding (or percent-encoding) is the process of converting characters into a format that can be transmitted over the internet. URLs can only be sent over the Internet using the ASCII character set. If a URL contains characters outside the ASCII set, the URL has to be converted.

Why use a URL Encoder? If you put a space in a URL, it might break the link. Encoding converts the space to `'%20'`, ensuring the browser and server understand it correctly. It is essential for sending data securely via API calls or query parameters.

Features

Two-Way Conversion

Instantly switch between Encoding text to URL-safe format and Decoding URI strings back to text.

Batch Processing

Encode or Decode thousands of URLs at once with our Line-by-Line mode. Perfect for log files.

File Support

Directly upload `.txt` or `.log` files to process large datasets without copy-pasting.

Smart Modes

Choose between `Component` encoding (for params) or `Full URL` encoding (preserving protocol slashes).

Form Compatibility

Toggle between standard `%20` and legacy `+` encoding for spaces to match your specific API requirements.

100% Secure

Processed entirely in your browser. Perfect for decoding sensitive API keys or tokens safely.

How to use

  1. Input: Enter text containing spaces, special symbols, or foreign characters.
  2. Mode: Toggle between URL Encode or URL Decode using the switch at the top.
  3. Customize: If encoding, choose "Component" (safest) or "Full URL".
  4. Result: Copy the result instantly. Check the stats to see character expansion.

Example - Encode & Decode

Input (Text)
Hello & World?
Result (Encoded)
Hello%20%26%20World%3F

Frequently Asked Questions

What is URL encoding?

It is a mechanism for encoding information in a Uniform Resource Identifier (URI). Characters that are not allowed in a URL (like spaces) are replaced with a % followed by their two-digit hexadecimal ASCII value.

How do I decode a URL online?

Simply switch this tool to 'URL Decode' mode using the toggle button. Paste your string containing % signs (like %20 or %2F), and we will convert it back to readable text instantly.

Why do spaces turn into %20?

URLs cannot contain actual spaces because they would break the link structure. The ASCII code for a space character is 32 (decimal) or 20 (hexadecimal). In percent-encoding, this becomes %20.

What is the difference between %20 and +?

Both represent a space. %20 is the standard percent-encoding used in URL paths and newer specs. + is a legacy standard often used specifically in query string parameters (key=value pairs) by some HTML forms.

Should I use encodeURI or encodeURIComponent?

Use encodeURIComponent (our default 'Component' mode) if you are putting text inside a query parameter to ensure special chars like & don't break the URL. Use encodeURI ('Full URL' mode) only for valid full URLs where you want to preserve protocol slashes.

Which characters are unsafe in URLs?

Unsafe characters include spaces, quotes (", '), brackets (<, >, [, ]), braces ({, }), pipes (|), backslashes (\), and carets (^). These must always be encoded.

Does this tool support UTF-8 characters and Emojis?

Yes! Our tool uses JavaScript's native encoding, which supports UTF-8. Emojis and foreign language characters will be converted to their correct multi-byte UTF-8 percent-encoded sequences.

Is it safe to encode passwords or API keys here?

Yes, it is safe because our tool runs 100% on your device (Client-Side). Your data is never sent to our servers, so your sensitive strings remain private.

Can I use the output in HTML attributes?

Yes, but be careful. URL encoding is for URLs. If you are putting data into an HTML attribute like href, this output is perfect. If you are putting it into onclick or visible text, you might need HTML Entity Encoding instead.

What happens if I try to decode an invalid string?

If a string contains an incomplete percent sequence (like %2 instead of %20), the detailed decoding process cannot complete. Our tool will display a clear error message alerting you to the malformed input.