Home/Encoding Tools/URL encode / decode

URL encode / decode

URL Encoder and Decoder

Keep URLs safe for transport or restore them instantly.

Encoding 0 → 0 bytes Raw text
InputHandles full URLs, localhost, paths, queries
OutputInstant preview
Safe for unicode Live as you type Fits desktop & mobile

How it works

URL encoding replaces reserved characters with %HH escapes so text can ride safely inside query strings and paths. Decoding reverses those escapes back to readable text.

  • This page uses encodeURIComponent rules, which escape spaces, ampersands, slashes, and unicode.
  • Encoding is not encryption; do not rely on it for secrets.

Quick examples

Encode query text
search=dev tools & page=1
search%3Ddev%20tools%20%26%20page%3D1
Decode URL
https%3A%2F%2Fstackatlas.dev%2Ftools%3Fq%3Dencode%2520urls
https://stackatlas.dev/tools?q=encode%20urls

Use encode for fragments you inject into a larger URL; decode to inspect incoming params.

Mini FAQ

Why do spaces become %20?

encodeURIComponent follows RFC 3986 and encodes spaces as %20 so they are unambiguous in URLs.

Should I encode a whole URL?

Encode parts (query values, path segments). Encoding a full URL can over-escape slashes and colons.

Decode shows gibberish?

The input may be double-encoded. Decode twice only if you trust the source.