Developer Tools

URL Encoder & Decoder

Percent-encode URLs or components for safe links, and decode encoded URLs back instantly.

Paste a URL or text, choose a mode, and press Encode or Decode.

What is URL encoding?

URLs may only contain a limited set of ASCII characters, so anything else — spaces, Urdu text, emoji, or reserved symbols inside a value — must be percent-encoded as % followed by two hexadecimal digits (a space becomes %20). Encoding also protects reserved characters like ?, &, and = when they appear inside a query value rather than as URL structure. This tool offers both standard modes: encodeURI for whole URLs (leaving structural characters intact) and encodeURIComponent for individual values (encoding everything that is not unreserved), plus decoding back to the original.

How to Use the URL Encoder Online

  1. Paste your URL or text into the input box.
  2. Choose Full URL when encoding a complete link, or Component when encoding a single query value or path segment.
  3. Press Encode to percent-encode, or paste encoded text and press Decode to restore it.
  4. Copy the result with Copy output.

URL Encoder — Key Features

URL Encoder — Common Use Cases

URL Encoder — Practical Tips

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?
encodeURI is for whole URLs — it leaves structural characters like : / ? # & = alone. encodeURIComponent is for a single value inside a URL and encodes those characters too, so the value cannot break the URL's structure.
Why do spaces become %20?
URLs cannot contain literal spaces, so each space is replaced by its UTF-8 byte value in hexadecimal, prefixed with %. In form-encoded query strings a space may also appear as +.
What causes 'malformed URI sequence' errors when decoding?
A % not followed by two valid hex digits, or a truncated multi-byte UTF-8 sequence. It usually means the text was only partially encoded or was corrupted in transit.
Should I encode an entire URL before using it in an href?
Usually not — a valid URL is already encoded where it needs to be. Encode the individual values you insert into it, not the finished URL.
Does this tool upload my URLs anywhere?
No. Encoding and decoding use the browser's built-in functions locally, so your links and data stay on your device.
When do I need to encode a URL?
When links contain spaces or special characters — encoding converts them to safe % codes browsers understand.
How do I decode a URL?
Paste the encoded URL and switch to decode mode — the original readable URL appears instantly.