Free URL Encoder / Decoder Online

Percent-encode text for safe use in a URL or query string, or decode an already-encoded URL back to readable text.

How to encode or decode a URL

  1. 1

    Paste your text or URL

    Enter the plain text or URL you want to encode in the left box.

  2. 2

    Click "Encode"

    Special characters like spaces, &, and # are converted to their percent-encoded equivalents.

  3. 3

    Or paste an encoded value and click "Decode"

    Paste a percent-encoded string into the right box to convert it back to readable text.

Example use cases

1

Building query string parameters

Encode a search term or redirect target so it's safely embedded in a query string.

2

Debugging a broken link

Decode a mangled-looking URL to see what value it actually contains.

3

Sharing links with special characters

Encode spaces, ampersands, and other reserved characters before pasting a link into an email or form.

Frequently asked questions

What is URL encoding?

URL (percent) encoding replaces characters that aren't allowed in a URL — like spaces, &, and # — with a % followed by their hex code, so the value can be safely used inside a URL or query string.

When do I need to encode a URL?

Encode a value whenever it's placed inside a query string parameter, such as a search term, redirect target, or tracking value, so special characters don't break the URL's structure.

Is my data sent to a server?

No. Encoding and decoding both run locally in your browser using JavaScript's built-in encodeURIComponent and decodeURIComponent.

Why does decoding sometimes show "Invalid encoded input"?

This happens when the text contains a malformed percent-sequence, such as a stray % not followed by two valid hex digits.