URL Encode / Decode

Encode, decode, parse, and build URLs with query parameters — all in your browser.

About This Tool

The URL Encode / Decode tool helps developers work with percent-encoded URLs. URL encoding (also called percent-encoding) replaces unsafe characters with a %HH escape sequence so they can be safely transmitted in URLs, query strings, and form data.

This tool offers four modes. Encode converts plain text into a URL-safe string. Decode reverses the process. Parse breaks a full URL into its components — protocol, host, port, path, query parameters, and fragment — so you can inspect each piece. Build lets you construct a URL from a base address and a list of key-value query parameters.

You can choose between component encoding (encodeURIComponent) and full URL encoding (encodeURI). Component encoding is stricter and encodes characters like /, ?, and &, making it suitable for individual query-parameter values. Full URL encoding leaves the URL structure intact and only encodes characters that are never valid in a URI.

Everything runs client-side in your browser using the native encodeURI, encodeURIComponent, and URL APIs. No data is sent to any server, making it safe for URLs that contain tokens, API keys, or other sensitive parameters.

How to Use

  1. Choose a mode from the tabs: Encode, Decode, Parse, or Build.
  2. In Encode / Decode mode, paste your text and see the result instantly. Toggle Component to switch between encodeURIComponent and encodeURI.
  3. In Parse mode, paste a full URL to see its protocol, host, path, query parameters, and fragment.
  4. In Build mode, enter a base URL and add key-value pairs. The generated URL updates as you type.
  5. Click Copy or press Ctrl+Shift+C to copy the output.

FAQ

What's the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URI and leaves structural characters like /, ?, and # untouched. encodeURIComponent encodes everything except unreserved characters, making it suitable for individual query values or path segments.

Is my data safe?

Yes. All encoding and decoding happens in your browser using native JavaScript APIs. Nothing is sent to any server.

Why do I need to URL-encode text?

URLs can only contain a limited set of ASCII characters. Special characters (spaces, Unicode, &, =, etc.) must be percent-encoded to avoid breaking the URL structure or being misinterpreted by servers.

Can I parse URLs with fragments and ports?

Yes. The Parse mode uses the browser's built-in URL constructor and correctly handles ports, fragments (#), usernames, and all standard URL components.

How does the query string builder work?

Enter a base URL and add key-value pairs. The tool uses URLSearchParams to properly encode each parameter and appends them to the URL. The result updates in real-time as you type.

Related Tools