URL Encoder / Decoder

Percent-encode or decode URLs and query strings.

Free online URL encoder and decoder

This URL encoder and decoder converts text to and from percent-encoding — the format web addresses use to carry spaces, symbols, and non-English characters safely. Encode a value before dropping it into a query string, or decode a messy %20-riddled link back into readable text. Everything converts live as you type and runs entirely in your browser, so private links and tokens never leave your device.

How to encode or decode a URL

  1. Choose Encode or Decode with the toggle at the top.
  2. Pick Component value for one parameter, Full URL for a whole address, or Form value for the + space convention.
  3. Type or paste your text into the input box, or load an example for the selected mode.
  4. Read the converted output, then click Copy to grab it or Swap to feed the result back in.

Component vs Full URL — which mode?

Component mode uses encodeURIComponent. It escapes every reserved character — including &, =, ?, /, and # — because it assumes you are encoding one piece, such as a single query-string value or path segment. Full URL mode uses encodeURI, which leaves those structural characters alone so an entire address like https://example.com/a b?x=1 stays valid while only illegal characters such as spaces get escaped. Reach for Component when building a parameter and Full URL when cleaning up a complete link. Full URL decoding preserves escaped reserved characters so a value such as %26 does not turn into a new query separator. Form value mode is for one form-encoded value: spaces become + and literal plus signs become %2B.

Related encoding tools

Working with data as well as links? Convert binary and text with our Base64 encoder / decoder, or escape markup for the web with the HTML entity encoder. All of them run locally in your browser with nothing uploaded.

Frequently asked questions

What is URL encoding?

URL encoding (also called percent-encoding) replaces characters that are unsafe or reserved in a URL with a percent sign followed by two hexadecimal digits. For example, a space becomes %20 and an ampersand becomes %26. It lets you put arbitrary text — including spaces, accents, and symbols — safely inside a web address or query string.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent encodes a single value such as one query-string parameter, so it also escapes characters like &, =, ?, /, and # that have special meaning in a URL. encodeURI is meant for a complete URL, so it leaves those structural characters intact and only escapes clearly illegal ones like spaces. Use Component mode for a value you are inserting into a URL, and Full URL mode to tidy up a whole address.

How do I decode a URL-encoded string?

Switch this tool to Decode mode and paste your encoded text. Component mode decodes percent-encoded values. Full URL mode preserves encoded reserved characters such as %26 so the URL structure stays intact. Form value mode also converts + to a space. If the input contains a malformed escape such as a lone % or %ZZ, the tool shows a friendly error instead of failing silently.

Is my data sent to a server?

No. All encoding and decoding happens entirely in your browser with JavaScript. Your text is never uploaded, logged, or stored, so it is safe to use with private links, tokens, and query parameters.

Why does a space become %20 or a plus sign?

In the path and most contexts a space is percent-encoded as %20, which is what this tool produces. Form encoding (application/x-www-form-urlencoded) uses + for spaces. Choose Form value mode to encode spaces as + and literal plus signs as %2B, or to decode + back to a space. Component and Full URL modes keep a literal + unchanged when decoding.

Does it handle Unicode and emoji?

Yes. Characters outside ASCII, including accented letters and emoji, are first converted to UTF-8 bytes and then percent-encoded, matching how browsers build real URLs. Decoding reverses the process to give back the original Unicode text.