URL Encoder / Decoder

Percent-encode a URL component for safe use in a query string, or decode one back to readable text — entirely in your browser.

Runs entirely in your browser — nothing is sent to our servers.

How to use it
  1. Choose Encode or Decode.
  2. Paste your input on the left.
  3. Read the result on the right and copy it.

Input

hello%20a2zutil.dev%20world

What is URL encoding?

Percent-encoding (also called URL encoding) replaces characters that aren't safe inside a URL — spaces, ampersands, slashes, and anything outside the ASCII range — with a % followed by their hex byte value, so the result survives being placed inside a query string, path segment, or form submission without being misread as structural syntax.

Why use this tool

Everything happens in your browser — nothing you paste here is sent anywhere. Encoding uses the browser's own UTF-8-aware APIs, so emoji and non-Latin scripts round-trip correctly rather than producing mojibake.

This is a fast way to check exactly what a query parameter value will look like on the wire, or to decode a URL pulled from a log line or browser address bar back into something readable.

URL encoding gotchas

encodeURIComponent vs. encodeURI

encodeURIComponent and the older encodeURI disagree on which characters they touch — encodeURIComponent escapes &, = and ? because it assumes you're encoding a single value that will be placed inside a query string, while encodeURI leaves those alone because it assumes you're encoding a whole URL that already contains them structurally. This tool encodes a component (like encodeURIComponent) — the right choice for a query-string value, not for an entire URL.

Decode treats + as a space

Decode here converts a literal + into a space before percent-decoding, matching how browsers and servers read application/x-www-form-urlencoded query strings and form bodies. That's usually what you want when decoding a query string, but if the text you're decoding genuinely contains a literal plus sign (a phone number, a math expression) rather than an encoded space, it will come out wrong — percent-encode a literal + as %2B at the source to avoid the ambiguity.

URL encoder / decoder FAQ

No. Encoding and decoding both run locally in your browser.

This tool percent-encodes a component, meaning characters like / and ? are escaped. That is what you want for a query-string value, not for an entire URL, which already relies on those characters structurally.

Yes. Encoding uses the browser's UTF-8-aware encodeURIComponent, so non-ASCII characters round-trip correctly.

Decode treats + as an encoded space, matching how form and query-string data is conventionally encoded. If your original text has a literal plus sign, it needs to have been percent-encoded as %2B at the source.