Encoding & Hashing

URL Encoder / Decoder

Encode and decode URLs or URI components following RFC 3986, perfect for query strings, paths and shareable links.

Privacy: This tool runs entirely in your browser. Your data never leaves your device and is never uploaded to any server.

Output will appear here.

How to use this URL encoder

  • Paste a URL, a single query value, or a whole query string.
  • Use component mode for one value, such as a search term.
  • Use full-URL mode when the structure — slashes, colons, question marks — must stay intact.
  • Switch to decode to turn percent-encoded text back into something readable.

Characters that must be escaped

Some characters always need encoding, others only in certain positions. This is the reference most developers end up looking for.

CharacterEncodedWhy it matters
Space%20Not allowed anywhere in a URL
#%23Starts the fragment; otherwise it truncates everything after it
&%26Separates query parameters
+%2BHistorically means a space in query strings
/%2FSeparates path segments
?%3FStarts the query string
=%3DSeparates a parameter name from its value
%%25Starts an escape sequence, so a literal one must be escaped

What percent-encoding is

A URL may only contain a limited set of characters. Anything outside that set is replaced by a percent sign followed by two hexadecimal digits: a space becomes %20, an ampersand becomes %26, and a non-ASCII character becomes several sequences representing its UTF-8 bytes.

The rules come from RFC 3986. Without encoding, a search term containing & would be read as the start of a new query parameter, and a # would silently truncate the URL.

The two modes are not interchangeable

  • encodeURIComponent escapes almost everything, including / ? : & = — correct for a single value.
  • encodeURI keeps the characters that give a URL its structure — correct for a complete address.
  • Encoding a whole URL in component mode breaks it: the slashes turn into %2F.
  • Encoding a query value in full-URL mode is unsafe: an & inside the value stays unescaped.

Why values sometimes look double-encoded

A % in the original text is itself encoded as %25. If that text is encoded a second time — which happens whenever a framework re-encodes a value that was already encoded — you get %2525, which decodes to a literal %25. This double-encoding is one of the most common causes of broken redirect URLs and failed signature checks.

Nothing leaves your browser

Encoding and decoding use the browser-native encodeURIComponent and encodeURI functions, so the text never leaves your device. That matters, because URLs frequently carry tokens, session ids and other values you would rather not hand to a stranger.

Frequently asked questions

What is URL encoding?

URL encoding (percent-encoding) replaces reserved or unsafe characters with a % followed by two hexadecimal digits.

What is the difference between URL and component encoding?

Component encoding escapes more characters and is for query values, while URL encoding preserves URL structure like slashes and colons.

Is this RFC 3986 compliant?

Yes. The tool uses the browser-native encodeURIComponent and encodeURI functions, which follow the RFC 3986 standard.

Why did my space turn into a plus sign?

That comes from HTML form encoding, where a plus means a space inside a query string. In a path the plus is literal, so percent-encoding with %20 is the safer choice in both places.

Do I need to encode a colon in a URL?

Not in the scheme separator after https, but yes inside a query value, where it should become %3A.

Should I encode a whole URL or just the parameters?

Only the parameters. Encoding an entire URL turns its slashes into %2F, and the result is no longer a usable address.

More Encoding & Hashing tools