Skip to content
gohacks.dev
APIs

URL Encoder and Decoder

Percent-encode a query value or a whole URL, decode one back, and see every query parameter in a table.

Free · No sign-up · Your inputs stay in your browser

Input

Encode or decode a URL

Output

Result

Query keyDecoded value
qlaravel queues
sortnew

Runs in this browser. Nothing you paste is sent to a server.

Which function to use

encodeURIComponent escapes &, =, ? and /, so it is the one for a single query value or path segment. encodeURI leaves them alone so a full URL keeps its structure. Encoding a value with encodeURI is the classic bug: an & inside the value splits it into two parameters.

Spaces: %20 or +?

Both appear. %20 is the URL encoding of a space; + means a space only in application/x-www-form-urlencoded data, such as an HTML form submission. PHP's urlencode() produces + and rawurlencode() produces %20.

Share

Frequently asked questions

What is the PHP equivalent of encodeURIComponent?
rawurlencode() is the closest match. It follows RFC 3986, while urlencode() encodes spaces as + for form data.
Why do I get "URI malformed" when decoding?
A % is followed by characters that are not a valid UTF-8 byte sequence, often a literal % sign that was never encoded as %25.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools