URL Encoder / Decoder
Percent-encode a URL for safe use in links and APIs, or decode an encoded URL back to readable text.
How it works
URLs may only contain certain characters; everything else (spaces, non-English letters, symbols) must be percent-encoded, e.g. a space becomes %20. Use Component mode when encoding a value to embed inside a URL, and Full URL mode when encoding a complete link — it leaves : / ? & and = untouched. Malformed sequences are flagged when decoding.
How to use
- Paste your URL or text into the input box.
- Choose the encode mode: Component for a value embedded inside a URL, Full URL for a complete address.
- Click Encode to percent-encode it, or Decode to turn an encoded string back into readable text.
- Copy the result, or Clear to start over.
Frequently asked questions
What does percent-encoding do?
URLs may only contain certain characters, so everything else — spaces, non-English letters, symbols — is rewritten as a percent sign plus two hex digits. A space becomes %20, which keeps links and API calls intact.
What is the difference between the two modes?
Component mode encodes every reserved character, which is what you want for a value tucked inside a query string. Full URL mode preserves the address structure — the ://, ?, and & characters — while encoding everything else.
When would I need this?
Whenever text with spaces or symbols travels inside a URL: a search query like ?q=hello%20world, a filename with parentheses, or a redirect address passed as a parameter.
Is decoding always safe?
Decoding only reverses %XX sequences back to characters. It does not make untrusted input trustworthy — never decode and then execute or blindly trust user-supplied URLs in your own applications.
What is the difference between encodeURI and encodeURIComponent?
They are the JavaScript functions behind the two modes. encodeURI leaves ://?&= intact for whole addresses; encodeURIComponent encodes those too, for values embedded inside a URL. Using the wrong one is the classic cause of double-encoded %2520 messes.