Toggle language
Toggle theme
Back

URL Encoder/Decoder

Mode

Select encode or decode mode

Options

Encode all special characters including /, ?, &, =

Use + instead of %20 for spaces (application/x-www-form-urlencoded)

Text Input

0 chars

URL-Encoded Output

0 chars
0
Input Chars
0
Output Chars
0
Encoded Sequences

Common URL Encodings

space%20
!%21
#%23
$%24
&%26
=%3D
?%3F
@%40
+%2B
/%2F
:%3A
%%25

What is URL Encoding?

URL encoding, also known as percent-encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI). It replaces characters that have special meaning in URLs or are not allowed in URLs with a percent sign (%) followed by two hexadecimal digits representing the character's ASCII code.

This free online tool allows you to encode text for safe use in URLs or decode URL-encoded strings back to readable text. It supports both encodeURI and encodeURIComponent modes, as well as form data encoding conventions.

All processing happens directly in your browser - your data never leaves your device.

Common Uses for URL Encoding

Query Parameters

Encode values in query strings to ensure special characters like &, =, and spaces don't break the URL structure.

Form Submissions

HTML forms encode data using URL encoding before sending to servers. Understanding this helps debug form submissions.

API Requests

When building URLs for API calls, properly encoding parameters ensures data is transmitted correctly without corruption.

International Characters

Non-ASCII characters in URLs must be percent-encoded. This tool handles UTF-8 encoding automatically.

Frequently Asked Questions

What's the difference between encodeURI and encodeURIComponent?

encodeURI encodes a complete URL, preserving characters that have special meaning in URLs like :, /, ?, &, and =. encodeURIComponent encodes a URL component (like a query parameter value), encoding ALL special characters. Use encodeURIComponent for individual values and encodeURI for complete URLs.

Should I use %20 or + for spaces?

%20 is the standard percent-encoding for spaces and works everywhere. + is used specifically for application/x-www-form-urlencoded content (HTML form submissions). When in doubt, use %20. Some servers handle both, but %20 is more universally compatible.

Why are some characters not encoded?

RFC 3986 defines "unreserved characters" (A-Z, a-z, 0-9, -, _, ., ~) that never need encoding. Additionally, encodeURI mode preserves reserved characters that have special meaning in URLs. Only unsafe or reserved characters are percent-encoded.

Is URL encoding the same as URL escaping?

Yes, URL encoding and URL escaping refer to the same process. Both terms describe percent-encoding characters in URLs. The official term is "percent-encoding" as defined in RFC 3986.

Is my data sent to a server?

No. All encoding and decoding happens entirely in your browser using JavaScript. Your data never leaves your device, making this tool completely private and secure.