50% off all plans with SPRING50

Text to Encode

Result

https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den%26redirect%3Dhttps%3A%2F%2Fapp.example.com%2Fdashboard%3Fuser%3Djohn%20doe%23profile

Settings

Encodes all special characters including : / ? # & =. Best for encoding query parameter values.

Break down a URL into its components: protocol, host, path, query parameters, and hash fragment.

All encoding and decoding is performed locally in your browser. No data is sent to any server.

URL Encoder/Decoder

Encoding

Encode and decode URLs and query strings in real time. Supports encodeURIComponent and encodeURI modes, bulk encoding, and a built-in URL parser.

What is URL encoding?

URL encoding, also known as percent-encoding, converts characters into a format that can be safely transmitted in a URL. Special characters like spaces, ampersands, question marks, and non-ASCII characters are replaced with a percent sign followed by two hexadecimal digits (e.g., a space becomes %20). This is necessary because URLs can only contain a limited set of ASCII characters. Without encoding, characters like & and = would be confused with query string delimiters, and characters like é or 日 would break the URL entirely.

encodeURIComponent vs encodeURI

JavaScript provides two encoding functions with different behaviors. encodeURIComponent encodes all special characters including : / ? # & = — making it ideal for encoding individual query parameter values, redirect URLs inside URLs, and any string that will be inserted into a URL. encodeURI preserves URL-structural characters, so it is meant for encoding a complete URL while keeping its structure valid. In practice, encodeURIComponent is used far more often because developers typically need to encode values, not entire URLs.

Common use cases for URL encoding

Developers encounter URL encoding daily when building search forms (encoding user input in query strings), constructing API URLs with dynamic parameters, creating OAuth redirect URIs that contain nested URLs, handling internationalized domain names and paths, building mailto: links with subjects and bodies, and debugging encoded URLs in server logs. A reliable encoder/decoder saves time compared to reading raw percent-encoded strings or manually looking up character codes.

Frequently Asked Questions

Is this URL encoder free to use?

Yes, completely free with no sign-up required. All encoding and decoding happens in your browser — no data is sent to any server.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent encodes all special characters including URL structural ones (: / ? # & =), making it best for encoding query parameter values. encodeURI preserves those characters, making it suitable for encoding a complete URL while keeping its structure intact.

Can I decode URLs with plus signs?

Yes. The decoder automatically converts plus signs (+) to spaces, which is common in form-encoded data (application/x-www-form-urlencoded). Both %20 and + are handled correctly as spaces.

Part of 23+ free developer tools from BigDevSoon

Want to create your own tool?

Try our free Demo editor or start a 7-day trial with all features included.

No signup needed for demo editor