WELCOME TO MY DIGITAL GARDEN & TECHNICAL ARCHIVE READ MORE →

Need to drop a path or query value into a URL parameter without it breaking? This tool percent-encodes text so characters like /, ?, &, and spaces become URL-safe — for example /img/SMPTE becomes %2Fimg%2FSMPTE. It also works the other way, decoding percent-encoded text back to plain text. Everything happens locally in your browser.

[url-encoder-decoder.js] URL Encoder

How to use the URL encoder #

  1. Type or paste plain text into the Plain text box — it encodes automatically as you type.
  2. Copy the result from URL-encoded with the Copy encoded button, or use Encode → to trigger it manually.
  3. To go the other way, paste percent-encoded text into the URL-encoded box, or click ← Decode to convert it back to plain text.

This uses JavaScript's encodeURIComponent, which encodes a value meant to sit inside a URL component — like a query parameter — rather than a whole URL. That's why it escapes /, ?, &, and # too: those characters are safe in a full URL but would break things if left raw inside a parameter.

Where this comes in handy

Useful anywhere a piece of text needs to travel safely inside a URL: passing a path like /img/SMPTE as a query parameter, encoding a redirect target, building a share link with special characters in it, or decoding a parameter you copied out of a browser's address bar to see what it actually says.