URL Encode / Decode

Percent-encode a URL component or decode an escaped value.

Encoded component
coffee%20%26%20tea%20%2F%202

Percent-encoded spaces.

Breakdown & share
Full output
coffee%20%26%20tea%20%2F%202
Output characters
28
Processed on this device.

Your inputs

Operation

Example values. Change any of them.

More options

How it’s worked out

See the calculation

Percent-encoding writes a byte as % followed by two hexadecimal digits. Decoding reverses the process and reads the result as UTF-8.

  1. Convert the reserved characters and spaces to percent escapes.
  2. Return 28 output characters.

About this calculator

Encode individual query values, path segments and fragments with this tool. Keep the separators of a full URL separate.

Worked example

Encoded component · coffee%20%26%20tea%20%2F%202

Percent-encoding writes a byte as % followed by two hexadecimal digits. Decoding reverses the process and reads the result as UTF-8.

  1. Convert the reserved characters and spaces to percent escapes.
  2. Return 28 output characters.

Common questions

Why does a space become %20?

The hexadecimal byte value for an ASCII space is 20.

What is form-style encoding?

Form-encoded values use plus signs for spaces. A literal plus sign is encoded as %2B.

Can I decode a percent sign?

Yes. An escaped percent sign is %25.

Formula sources

Reference checked November 22, 2026.