URL Encoder
Encode a complete URL without destroying its scheme, slashes, query separators, or fragment marker. Paste a formed URL and receive a percent-encoded version that keeps structural delimiters readable. The conversion runs in this browser, which is useful for international characters and spaces in URLs you already assembled.
Runs locally — files stay on your deviceWhat does URL encoding do?
It replaces unsafe URL characters with percent-encoded UTF-8 byte values while this full-URL tool preserves structural delimiters such as /, ?, & and =.
What URL encoding means
A URL contains syntax delimiters and data. Percent encoding represents a UTF-8 byte as a percent sign followed by two hexadecimal digits. RFC 3986 separates reserved delimiters such as /, ?, & and = from unreserved letters, digits, hyphen, period, underscore and tilde.
How it works
This page applies encodeURI to the full string. It encodes characters that cannot safely appear as written while preserving characters that define URL structure. Use URI Component Encoder instead when the input is one parameter value.
Key concepts
Reserved characters
Characters such as /, ?, #, & and = can delimit URL components. Preserving them is what keeps a full URL structurally intact.
UTF-8 percent triplets
Non-ASCII characters become UTF-8 bytes and each encoded byte appears as % followed by two hexadecimal digits.
Full URL versus component
A full URL encoder preserves syntax. A component encoder escapes syntax characters because they are treated as data.
When to use it
- Prepare a complete URL containing spaces or non-ASCII text.
- Normalize a copied international URL before placing it in HTML or a request.
- Inspect what a browser-safe representation of a formed URL looks like.
When not to use it
- Do not use it to hide secrets; encoding is reversible.
- Do not encode an individual query value with this full-URL operation.
- Do not encode an already encoded URL without checking for double encoding.
Worked examples
Space in a path
- Input
https://example.com/summer sale- Expected output
https://example.com/summer%20sale
The slash structure remains and the space becomes %20.
Romanian path
- Input
https://example.com/căutare- Expected output
https://example.com/c%C4%83utare
The ă character is represented by its UTF-8 bytes.
Existing query structure
- Input
https://example.com/search?q=green tea&sort=new- Expected output
https://example.com/search?q=green%20tea&sort=new
Question mark, equals sign, and ampersand remain delimiters.
Fragment identifier
- Input
https://example.com/guide#step 2- Expected output
https://example.com/guide#step%202
The fragment marker remains while its space is encoded.
Email-style value
- Input
https://example.com/?contact=ana@example.com- Expected output
https://example.com/?contact=ana@example.com
The full URL operation preserves reserved characters; encode the value separately if @ must be data-only.
Common mistakes
Encoding only a value with the full-URL tool
Characters such as & and = remain because they may be URL delimiters. Correction: Use URI Component Encoder for a parameter value.
Double encoding
Encoding %20 again produces %2520 because the percent sign is treated as data. Correction: Decode or verify the input before encoding it a second time.
Treating encoding as encryption
Anyone can decode percent-encoded bytes. Correction: Keep credentials and private data out of URLs.
Confusing plus with a path space
+ is a form-query convention, not the general path representation for a space. Correction: Use %20 for a literal URL space unless a form encoding specification says otherwise.
Encoding before splitting components
Decoding or encoding delimiters at the wrong stage can change URL meaning. Correction: Construct components first, encode data values, then assemble the URL.
Best practices
- Encode dynamic components before assembling a URL.
- Avoid placing sensitive information in paths or query strings.
- Check whether the receiving system expects RFC 3986 URLs or form-urlencoded data.
Related operations and differences
URI Component Encoder
Use it for a query value, path segment, or other data component because it also escapes structural delimiters.
Base64 Encoder
Base64 represents bytes as ASCII text; it does not create a valid URL structure.
Limitations and privacy
- Malformed UTF-16 containing a lone surrogate cannot be encoded by encodeURI.
- The tool does not verify that the host exists or that the URL can be fetched.
- Application-specific URL schemes may impose additional rules.
Processing uses browser APIs on this device; the entered content is not sent to the Toolbox server.
Frequently asked questions
Should I encode the entire URL or only parameter values?
Encode the full URL only after it is assembled. Encode each dynamic parameter value with URI Component Encoder before assembly.
Why does a space become %20?
A literal space is not an unreserved URL character, so its UTF-8 byte is written as %20.
Does URL encoding encrypt a URL?
No. Percent encoding is a reversible representation, not confidentiality protection.
Are slashes encoded?
This full-URL tool preserves slashes because they delimit path segments.
What is double URL encoding?
It occurs when an existing percent triplet is encoded again, turning % into %25.
What is the encodeURI versus encodeURIComponent difference?
encodeURI preserves URL syntax; encodeURIComponent treats structural characters as data and escapes more of them.
References
- RFC 3986: URI Generic Syntax — RFC Editor
- encodeURI() — MDN