URL Encoder & Decoder

Encode special characters for safe use in URLs or decode percent-encoded strings back to readable text. Handles UTF-8 characters, query parameters, and full URLs. All processing happens in your browser.

✎ Text Input 0 bytes
✔ Encoded Output 0 bytes

URL Components

Enter text and click Encode
Input: 0 chars Output: 0 chars Encoded: 0 chars
Processing happens entirely in your browser Zovo Tools

How URL Encoding Works

URL encoding (percent encoding) replaces unsafe characters in a URL with a percent sign followed by their hexadecimal byte values. For example, a space becomes %20, an ampersand becomes %26, and a forward slash becomes %2F. This ensures that special characters do not break the URL structure or get misinterpreted by web servers and browsers.

Encode vs. encodeURIComponent

JavaScript provides two functions for URL encoding. encodeURI() encodes a full URL but preserves characters that are valid in URLs, such as :, /, ?, #, and &. encodeURIComponent() encodes everything except letters, digits, and - _ . ~, making it the right choice for encoding individual query parameter values. This tool provides both options.

Common Characters That Need Encoding

CharacterEncodedDescription
(space)%20Space character
&%26Query parameter separator
=%3DKey-value delimiter
?%3FQuery string start
#%23Fragment identifier
/%2FPath separator
@%40User info delimiter
+%2BPlus sign

Frequently Asked Questions

What is URL encoding and when do I need it?

URL encoding (also called percent encoding) converts characters that are not allowed in URLs into a format that can be transmitted safely. You need it whenever you pass user input, special characters, or non-ASCII text in a URL. Common scenarios include building API query strings, encoding form data, passing file names with spaces in URLs, and working with internationalized domain names or paths containing characters like accents or emoji.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a complete URL while preserving characters that have special meaning in URLs, such as colons, slashes, question marks, and hash symbols. encodeURIComponent encodes a single URL component (like a query parameter value) and encodes all special characters including those preserved by encodeURI. Use encodeURI when you have a full URL that just needs non-ASCII characters encoded. Use encodeURIComponent when encoding a value that will be inserted into a query parameter, path segment, or fragment.

Should I use %20 or + for spaces in URLs?

Both are valid in different contexts. %20 is the standard percent encoding for spaces defined in RFC 3986 and works everywhere in a URL including paths, query strings, and fragments. The plus sign (+) for spaces is specific to the application/x-www-form-urlencoded format used in HTML form submissions and some query strings. When building API requests or encoding path segments, use %20. When encoding HTML form data, either works, but %20 is the safer universal choice.

Can this tool handle UTF-8 and international characters?

Yes. This URL encoder fully supports UTF-8 encoding. International characters such as accented letters, Chinese, Japanese, Korean, Arabic, emoji, and other Unicode characters are converted to their UTF-8 byte sequences and then percent-encoded. For example, the character "cafe" with an accented e becomes "caf%C3%A9". This is the correct behavior specified by RFC 3986 and matches how modern browsers handle international URLs.

Is my data safe using this online URL encoder?

Yes. This URL encoder and decoder runs entirely inside your browser using JavaScript. Your data never leaves your device. There are no server requests, no logging, and no data storage. You can verify this by monitoring the Network tab in your browser's developer tools. This makes it safe for encoding URLs containing API keys, tokens, passwords, and other sensitive parameters.

Related Guide
How to Create a Chrome Extension →