Skip to main content
FixLines

URL encode and decode

Percent-encode text for a URL, or decode it back.

Editor

Ln 1, Col 10 lines0 words0 characters

URL encode and decode: what it does

Characters such as spaces, accents and symbols must be percent-encoded to travel safely in a web address or query string. Encode your text for a URL, or paste an encoded string such as “hello%20world” and decode it.

URL encode and decode: how to use it

  1. Paste your text, or the encoded string.
  2. Choose URL encode or URL decode.
  3. Select Apply and copy the result.

URL encode and decode: when to use it

  • Put a search phrase or a parameter value with spaces and accents into a URL.
  • Read a tracking link or a redirect URL that is full of percent codes.
  • Prepare a value for a query string in an API call or a form.

URL encode and decode: examples

Encode a search phrase

Input

café & tea

Result

caf%C3%A9%20%26%20tea
Decode it back

Input

caf%C3%A9%20%26%20tea

Result

café & tea
Encode a value with symbols

Input

price=10€&note=50% off

Result

price%3D10%E2%82%AC%26note%3D50%25%20off

URL encode and decode: questions and answers

Which characters are encoded?

Everything except letters, digits and the characters - _ . ! ~ * ' ( ). A space becomes %20 and an accented letter becomes its UTF-8 bytes.

Why does decoding show an error?

The text contains a percent sign that is not followed by two hexadecimal digits, or the bytes are not valid UTF-8.

Is a space %20 or a plus sign?

This tool writes %20, the form used in URL paths and most APIs. Decoding accepts a plus sign as a space as well.

Should I encode the whole URL?

No. Encode only the value of a parameter; encoding the full address would also escape the slashes and the question mark.

Is my text sent to a server?

No. Everything runs in your browser on your own device, so your text never leaves it.

Tools people often use together with this one.

More in Encode & decodeBrowse all text tools