πŸ”—

URL Encoder, Decoder & Parser

Encode/decode URLs and parse all components β€” protocol, hostname, path, query params, and hash.

Input
Encoded Output
⚑ All encoding/decoding runs locally in your browser β€” URLs and content are never transmitted.

About URL Encoder & Decoder

Percent-encoding (also called URL encoding) replaces characters that are not safe to include in a URL with a % sign followed by two hex digits. This tool encodes raw text using either encodeURI (preserves structural characters like / ? &) or encodeURIComponent (encodes everything except letters, digits, and - _ . ! ~ * ' ( )), and decodes percent-encoded strings back to their original form.

The Parse URL mode breaks any URL into its components β€” protocol, hostname, port, pathname, query string, and hash β€” and displays each query parameter as a separate key/value pair that can be copied as JSON. All operations run locally in the browser and no URLs you enter are transmitted anywhere.

Common Use Cases

How to Use

  1. Choose a mode: Encode to percent-encode text, Decode to reverse percent-encoding, or Parse URL to decompose a full URL.
  2. In Encode mode, check encodeURIComponent if you are encoding a single query parameter value (rather than an entire URL).
  3. In Parse URL mode, paste a full URL into the input field β€” components and query parameters are extracted and shown side by side.
  4. Click Copy as JSON in the Parse URL view to copy all query parameters as a structured JSON object.

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI is designed to encode a complete URL and leaves structural characters such as : / ? # & = @ unencoded. encodeURIComponent encodes all of those characters too, making it the correct choice when encoding the value of a single query parameter β€” for example, a URL that is itself a parameter value.

Why does %20 appear instead of + for spaces in some URLs?

There are two conventions for encoding spaces in URLs: RFC 3986 uses %20, while the older application/x-www-form-urlencoded format (used in HTML forms) uses +. Modern APIs and browser fetch calls use %20. This tool always uses %20 for encoding, and decoding handles both representations.

Can I parse URLs without a scheme like http://?

Yes β€” if you paste a URL without a scheme (for example, api.example.com/v1/users?page=2), the parser automatically prepends https:// to make it parseable by the browser's URL API, so you still get all components correctly broken out.

Advertisement