Skip to main content
Tools Star Hub

URL Encoder

Encode or decode URL components in your browser with encodeURIComponent.

What is URL Encoder?

A URL encoder applies encodeURIComponent or decodeURIComponent to a string you paste.

Loading tool…

This tool runs in your browser. Inputs, files and generated values stay on this device. Favorites and recently used tools, if you use them, store only tool names in local storage — never passwords, documents or QR contents. See the privacy policy.

URL Encoder / Decoder — Encode URL Components — Tools Star Hub

What this tool does

Percent-encode a string with encodeURIComponent, or decode a percent-encoded string. Developers putting a query value into a URL use it when spaces, ampersands, or slashes must be escaped. The result is not encrypted, and a half-finished sequence such as %E0 fails on decode.

How to use

  1. Paste the text or encoded string into the input box.
  2. Press Encode to apply encodeURIComponent, or Decode to reverse it.
  3. Copy the result, swap the boxes, or clear both.

Examples

  • A space and an ampersand

    “a b&c” encodes to a%20b%26c.

  • Unicode

    Accented letters and other scripts encode to UTF-8 percent sequences and decode back to the original text.

How it works

URL encoding (percent-encoding) represents characters that are not safe in a URL component. It is not encryption: anyone can decode the result. This tool uses the browser’s encodeURIComponent and decodeURIComponent, which encode more characters than encodeURI (including ?, &, and /).

Limitations

encodeURIComponent is the encoder, so ?, &, and / are escaped. That is stricter than encodeURI. The output is not a secret. On the way back, a half-finished sequence such as %E0 is rejected.

See the disclaimer for what these tools do not cover.

FAQ

Is the URL Encoder free?
Yes. Percent-encoding a string, or decoding one, costs nothing and does not ask for an account.
Why did decoding fail?
Incomplete sequences such as %E0%A4%A are invalid. The tool shows an error instead of crashing.
Is my text sent to a server?
No. Encoding and decoding run in your browser.
What does %20 mean in a URL?
%20 is the percent-encoded form of a space. Percent-encoding writes a character as % followed by its byte value in hexadecimal.
What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves characters such as / ? & and = alone so a whole address still works. encodeURIComponent escapes them too, which is what you want for a single query value. This tool uses encodeURIComponent.