GetCalculator
Everyday

URL Encode / Decode

URL-encode text so it's safe to use in a query string, or decode a percent-encoded URL string.

=Output
hello%20world%20%26%20friends
How this compares
  • Input Characters21
  • Output Characters29

Encoding grew 21 input characters into 29 output characters as unsafe characters were replaced with %-escapes.

Characters unsafe in a URL (spaces, &, ?, #, and others) are replaced with a % followed by their hex code, so the text can travel safely inside a query string.

About the URL Encode / Decode

This tool URL-encodes text so it's safe to include in a web address or query string, or decodes a percent-encoded URL string back into its original readable form — the encoding scheme behind those %20s and %26s you see scattered through URLs.

It's used by developers building query strings by hand, by anyone trying to read what a long tracking or redirect URL actually says once the percent-encoding is stripped away, or when debugging why a link with spaces or special characters isn't working as expected.

The conversion runs entirely in your browser using the same encoding logic web browsers themselves use, so pasting in a URL fragment to decode is safe and nothing is sent anywhere.

How it’s calculated

Certain characters — spaces, ampersands, question marks, hashes, and others — have special meaning inside a URL and can't appear literally in most parts of it without causing confusion about where the URL structure ends and the actual data begins. Percent-encoding replaces each unsafe character with a % followed by its two-digit hexadecimal code (a space becomes %20, an ampersand becomes %26, and so on).

This lets arbitrary text — including spaces, punctuation, and non-ASCII characters — travel safely inside a URL's query string or path without breaking the URL's own syntax, since the decoder on the receiving end reverses the process to recover the original text.

Frequently asked questions

Why do spaces in a URL show up as %20 or a plus sign?

%20 is the standard percent-encoded representation of a space. A plus sign (+) is an older convention specifically used inside URL query strings (and form submissions) to represent a space — both are valid depending on context, though %20 is the more universally correct form.

Which characters need to be URL-encoded?

Reserved characters with special meaning in URL syntax — spaces, &, ?, #, %, /, and others — along with non-ASCII characters generally need encoding. Letters, numbers, and a handful of symbols like hyphens and periods are considered safe and left as-is.

Why does decoding sometimes fail with an error?

Decoding fails when the input contains a % that isn't followed by a valid two-digit hex code, or when it isn't correctly formed percent-encoded text to begin with — often the sign of a string that was only partially encoded or has been modified since it was originally encoded.

Is URL encoding the same thing as encryption?

No — URL encoding is purely a way to safely represent characters within URL syntax, not a security measure. It's trivially reversible by anyone, so it should never be relied on to hide or protect sensitive information.

Powered by GetCalculator.online