URL Encoder / Decoder – Encode & Parse URLs Online

Full URL (encodeURI)

Component (encodeURIComponent)

Path (segments encoded)

Calcon's free URL Encoder/Decoder shows three encoding variants instantly — full URL, component-encoded, and path-encoded. The built-in URL Parser breaks any URL into its protocol, domain, path, query parameters, and hash.

Encoding Function Reference

FunctionSafe CharactersUse For
encodeURI()A–Za–z0–9 ; , / ? : @ & = + $ - _ . ! ~ * ' ( ) #Full URLs
encodeURIComponent()A–Za–z0–9 - _ . ! ~ * ' ( )Query params, fragments
Path encodingEncodes each segment, keeps /URL paths

Frequently Asked Questions

What is URL encoding?

URL encoding (percent encoding) converts characters that are not allowed or have special meaning in URLs into a safe format. Each unsafe character is replaced by a percent sign (%) followed by its two-digit hexadecimal code. For example, a space becomes %20 and & becomes %26.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL and leaves valid URL characters (like ://?#&=) untouched. encodeURIComponent encodes a URL component (like a query parameter value) and encodes everything including ://?#&=. Use encodeURIComponent for individual parameter values, encodeURI for a full URL.

Why do URLs need encoding?

URLs can only contain certain ASCII characters. Spaces, special characters, and non-ASCII characters (like accented letters or Chinese characters) must be percent-encoded so they can be transmitted over the internet without ambiguity. Without encoding, characters like & or = in parameter values would be misinterpreted as URL syntax.

What does the URL parser show?

The URL parser breaks down a full URL into its components: protocol (https:), domain/hostname (example.com), port, path (/page/slug), query parameters (key=value pairs), and hash fragment (#section). This is useful for debugging API endpoints and understanding URL structure.

Related Developer Tools

Subscribe to the Calcon newsletter

Get new calculators, tools, and practical guides delivered to your inbox. No spam — unsubscribe anytime.