Encode or decode any URL — free, no sign-up required.
URL Encoder / Decoder — Free Online ToolWhat is URL encoding?
URLs (Uniform Resource Locators) follow a strict specification defined in RFC 3986. Only certain characters are allowed directly: letters (A–Z, a–z), digits (0–9), and a handful of special characters (- _ . ~). Every other character — including spaces, brackets, quotation marks, and non-ASCII characters — must be percent-encoded: replaced with a percent sign followed by the character's two-digit hexadecimal representation in UTF-8.
A space becomes %20. An ampersand becomes %26. The copyright symbol © becomes %C2%A9 (because it is represented by two bytes in UTF-8). This encoding ensures that any data can be safely embedded in a URL without breaking its structure or causing ambiguity for servers and browsers.
URL encoding is not the same as URL shortening or encryption. It does not hide your data — it merely makes it safe for transmission. Anyone who receives an encoded URL can decode it trivially. Its purpose is syntactic safety, not privacy.
How to encode or decode a URL — step by step
Using UtilsBox's URL Encoder takes seconds:
- Step 1: Open the URL Encoder. Navigate to utilsbox.app/url-encoder/. The tool offers two modes: Encode (convert a raw string to URL-safe format) and Decode (convert an encoded string back to readable text).
- Step 2: Choose your mode. Select Encode if you have a string you want to include in a URL (e.g., a search query, a file path, or a user-generated value). Select Decode if you have received an encoded URL you want to read.
- Step 3: Paste or type your input. Enter the text you want to encode or the encoded string you want to decode. The tool processes it instantly — no need to click a button.
- Step 4: Copy the result. Click the copy button next to the output field. The encoded or decoded result is now on your clipboard, ready to use in your application, browser address bar, or code.
- Step 5: Choose encoding mode if needed. The tool supports both full URL encoding (preserving structural characters like
/,?, and&) and component encoding (encoding everything, suitable for individual query values). Select the mode appropriate for your use case.
Tips and best practices
- Always encode query parameter values. If you are constructing a URL in code and inserting user-provided data, always use your language's equivalent of
encodeURIComponent()on each value. Failing to do so can break your URLs and introduce security vulnerabilities. - Do not double-encode. Encoding an already-encoded string turns
%20into%2520(encoding the percent sign). Always decode first if your input may already be encoded. - Understand the difference between + and %20. In HTML form submissions, spaces are often encoded as
+in query strings. Most servers handle both, but%20is the standards-compliant choice when building URLs programmatically. - Non-ASCII characters require UTF-8 encoding. Characters outside the ASCII range must first be expressed as UTF-8 bytes, then percent-encoded. Our tool handles this automatically — just paste your text and let it do the work.
- Use for API query strings. When calling REST APIs with search terms or filters containing special characters, always URL-encode the values before appending them to the endpoint URL.
Frequently asked questions
What is URL encoding?
URL encoding converts characters that cannot appear directly in a URL into a safe representation: a percent sign followed by two hexadecimal digits. A space becomes %20, a question mark becomes %3F, and a hash becomes %23. It ensures URLs are valid, unambiguous, and correctly transmitted across different systems and protocols.
What is the difference between %20 and + in URLs?
%20 is the standard percent-encoding for a space and is valid anywhere in a URL. The + sign represents a space only inside query strings (the portion after ?), following the application/x-www-form-urlencoded format. If you are building URLs programmatically, prefer %20 for consistency. If you see + in a decoded query string, it is a space.
When should I use encodeURIComponent vs encodeURI?
encodeURIComponent() encodes nearly everything, including characters like /, ?, and & — use it for individual parameter values. encodeURI() encodes a complete URL and leaves structural characters unencoded — use it when you have a full URL and want to make it safe without breaking its structure. In most development scenarios, encodeURIComponent() is the right choice.
Which characters need to be URL encoded?
Characters that are safe in URLs without encoding: letters (A–Z, a–z), digits (0–9), and - _ . ~. Everything else must be encoded when used as data, including spaces, punctuation, brackets, and all non-ASCII characters. Reserved characters (/ ? # [ ] @ ! $ & ' ( ) * + , ; =) only need encoding when used as literal data rather than in their structural role.
Conclusion
URL encoding is a fundamental web skill that every developer, API user, and technical person eventually needs. Whether you are debugging a broken link, building an API call, or passing user-generated data through a URL, knowing how percent-encoding works — and having a reliable tool to do it instantly — saves time and prevents errors.
UtilsBox's URL Encoder handles both encoding and decoding in a clean, instant interface. Paste in your text, get your result, and move on with your work.
Ready to encode your URL? No account needed.
URL Encoder / Decoder — Free Online Tool