URL Encoder & Decoder Online

Local processing

Encode or decode a URL path, query parameter value, or fragment component, handle form-style plus-sign spaces, remove common tracking parameters, clean and sort full URLs in one pass, normalize comparable URLs, or parse a full URL.

23 chars · 1 line

31 chars · 1 line

Encoding a URL component

Percent-encoding guide

How to encode and decode URL components

Percent-encode URL components with encodeURIComponent-compatible behavior, encode or decode complete URLs with encodeURI-compatible behavior, convert application/x-www-form-urlencoded values where spaces use plus signs, remove common tracking parameters, clean and sort full URLs in one pass, normalize comparable absolute URLs, or parse a complete URL. All conversion runs locally in your browser. This tool is free to use. No account or payment is required.

Last updated

What you can do here

  • encodeURIComponent-compatible encoding
  • decodeURIComponent-compatible decoding
  • encodeURI and decodeURI-compatible full URL conversion
  • application/x-www-form-urlencoded value encoding and decoding
  • Common tracking parameter removal
  • One-step tracking cleanup and query sorting
  • Absolute URL normalization and query sorting
  • Full URL component parsing
  • Unicode percent encoding
  • Invalid escape detection
  • Browser-local processing

How to use

  1. Choose Encode or Decode for a URL component, Full URL Encode or Full URL Decode when structural URL separators must stay intact, Form Encode or Form Decode for form-style values, Clean URL to remove common tracking parameters, Clean + Sort to remove tracking parameters and sort the remaining query, Normalize URL for a stable comparable form, or Parse URL for a complete absolute URL.
  2. Paste the component, form value, or URL that matches the selected mode.
  3. Review the percent-encoded, decoded, cleaned, sorted, normalized, or parsed output.
  4. Copy the result into your application, request, or configuration.

Component encoding versus full URLs

Encode and Decode follow encodeURIComponent and decodeURIComponent behavior. They are intended for individual values, so reserved separators such as ?, &, =, /, and # are encoded when they appear inside the component.

Encoding an entire URL with a component encoder also escapes structural separators. Full URL Encode and Full URL Decode follow encodeURI and decodeURI behavior so separators such as ?, &, =, /, and # remain structural instead of being rewritten as component data.

Form URL encoding and plus-sign spaces

Form Encode and Form Decode follow application/x-www-form-urlencoded value semantics. A space is serialized as +, while a literal plus sign is percent-encoded as %2B so the two values remain distinguishable.

  • Form Decode converts + back to a space before decoding percent escapes.
  • Regular Decode leaves + unchanged, matching decodeURIComponent behavior.
  • Use the Query String tool when you need to parse or build a complete collection of key-value parameters.

Remove common tracking parameters

Clean URL removes common analytics and ad-click parameters such as utm_*, gclid, fbclid, and msclkid from an absolute URL while keeping other query parameters, their order, the path, and the fragment.

  • Tracking parameter names are matched case-insensitively.
  • Business parameters that merely contain a tracking name, such as custom_utm_source, are preserved.

Clean and sort URLs in one pass

Clean + Sort combines tracking-parameter removal with the same stable query-key ordering used by Normalize URL. It is useful when copied campaign links need to become easier to compare, log, cache, or share without running two separate operations.

  • Common tracking parameters are removed before sorting the remaining query keys.
  • Repeated business parameters keep their existing value order, and the path and fragment are preserved.

Normalize URLs before comparing them

Normalize URL parses an absolute URL with the browser URL API, which canonicalizes the scheme and hostname, removes default ports, and resolves dot path segments. It then sorts query parameters by key so URLs that differ only by common structural variations are easier to compare.

  • Repeated parameters keep their existing value order while parameter names are sorted.
  • Normalization does not remove business or tracking parameters; choose Clean + Sort when both cleanup and sorting are intentional.

Spaces, Unicode, and percent escapes

Regular component encoding writes spaces as %20. Non-ASCII characters are represented as UTF-8 bytes and percent-encoded in both component and form modes.

  • Incomplete or invalid percent sequences produce a clear decode error.
  • A literal + must be written as %2B in form-encoded input if it should remain a plus sign after decoding.

Encode values before inserting them

Encoding user-provided component values prevents spaces and reserved characters from changing the structure of a URL. It does not validate whether the final URL is trusted or safe to navigate to.

URL component encoding example

Spaces and the ampersand are encoded so the text can be used as one query parameter value.

Component input

Codex tools & utilities

Encoded output

Codex%20tools%20%26%20utilities

Common questions

Frequently asked questions

Should I encode a complete URL with this tool?

Use Full URL Encode when you intentionally want encodeURI-style behavior that preserves structural separators. Use Encode for individual path, query, or fragment values where reserved characters are data and should be escaped.

Does decoding convert plus signs to spaces?

Regular Decode leaves + unchanged. Form Decode treats + as a space, matching application/x-www-form-urlencoded value semantics; use %2B when the decoded value should contain a literal plus sign.

What does Normalize URL change?

Normalize URL canonicalizes an absolute URL through the browser URL parser and sorts query parameters by name while preserving the order of repeated values. It does not remove parameters.

What does Clean URL remove?

Clean URL removes utm_* campaign parameters and common click identifiers such as gclid, fbclid, and msclkid. Other query parameters are preserved.

When should I use Clean + Sort?

Use Clean + Sort when you want one stable URL that removes common tracking parameters and alphabetizes the remaining query keys while preserving repeated-value order, the path, and the fragment.

Why does URL decoding fail?

The input contains an incomplete or invalid percent escape, or percent-encoded bytes that cannot be decoded as valid URI text.

Are URL component values uploaded?

No. Encoding and decoding run locally in your browser.

Looking for broader references? Browse all developer guides.