URL Encode & Decode Online — URL Encoder & Decoder
Encode a URL component with encodeURIComponent or preserve a full URL's structure with encodeURI.
Result appears here.
Component or full URL?
Is encodeURL a JavaScript function? There is no standard JavaScript function named encodeURL. Use encodeURI for an already structured full URL, or encodeURIComponent for one query value, form value, or path segment.
Component mode uses encodeURIComponent or decodeURIComponent. Choose it for a query value, path segment, form value, or other single piece of a URL.
Full URL mode uses encodeURI or decodeURI. It preserves structural characters such as :, /, ?, and # in an already assembled URL.
Do not encode an entire structured URL as one component unless that complete URL is itself being inserted as a parameter value. Encoding does not prove that a link is trustworthy.
Your tool input is processed in your browser. Analytics and advertising may receive ordinary usage and device data.
FAQ
Is encodeURL a JavaScript function?
No. Use encodeURI for a full URL or encodeURIComponent for a single component.
Why does a space become %20?
Percent encoding represents bytes that are not safe or unambiguous in a URL component.
Why can decoding fail?
A percent sign must be followed by two hexadecimal digits and the bytes must form valid text.
Does URL encoding make a destination safe?
No. Check the destination separately before opening an unfamiliar link.
Reviewed: 2026-08-14