Website Management Tools

URL Encoder Decoder

Percent-encode text for safe use inside a URL, or decode escaped sequences back to readable UTF-8 text. Component-level encoding keeps structural characters intact.

Runs in your browserNever uploaded to PagesTools.
Preparing tool…

The focused browser interface is loading.

100% privateYour input stays on this deviceLightning fastNo upload round-tripBrowser-basedProcessing runs on this deviceFree to useNo account required

What URL encoding changes

URLs use a defined set of characters for structure. A question mark starts a query, an ampersand separates parameters, an equals sign can separate a key from its value, and a hash introduces a fragment. When one of those characters belongs to the data rather than the structure, percent-encoding represents its UTF-8 bytes as percent signs followed by hexadecimal values.

For example, a space in a component becomes %20, while the accented character in a UTF-8 value becomes one or more percent triplets. Encoding prevents a value such as tea & cake from being misread as two query parameters. Decoding performs the reverse representation change; it does not validate whether the resulting link is trustworthy.

How to encode a URL component

  1. Identify the exact component you are encoding, such as one query value or path segment.
  2. Paste the raw text, not an already assembled URL containing intentional separators.
  3. Encode it and copy the escaped result into the correct position.
  4. Test the final URL in the receiving application with non-sensitive sample data.

Component encoding is usually the safe choice for user-provided keys and values. Encoding an entire URL as one component also escapes its colon, slashes, question mark, and ampersands, so it no longer works as a directly navigable address. Whole URLs are sometimes encoded intentionally when nested inside a redirect or share parameter, but only the outer parameter's value should receive that treatment.

How to decode an escaped value

  1. Paste the percent-encoded text or selected URL component.
  2. Decode once and inspect the result before attempting another pass.
  3. If the input uses form encoding, account for plus signs that may represent spaces.
  4. Do not automatically navigate to an unfamiliar decoded destination.

A malformed percent sequence, such as a percent sign without two hexadecimal digits, should produce an error rather than a guessed character. A decoding failure can also indicate truncated UTF-8 bytes. Preserve the original value while troubleshooting so you can compare exactly what the upstream system supplied.

Reserved characters and common traps

Percent encoding versus form encoding

HTML form query encoding often represents spaces as plus signs, while general URI component encoding uses %20. A literal plus in a form value therefore needs its own encoding as %2B. When a decoder turns plus into space unexpectedly, determine whether the source is an application/x-www-form-urlencoded form or an ordinary URL component.

Double encoding

If %20 becomes %2520, the percent sign was encoded a second time. Decode only at the application layer that owns the encoding and avoid repeated encode operations on values that may already be escaped. Security filters and backend frameworks often decode at different stages, so ambiguous multi-encoded input should be rejected instead of normalized repeatedly.

Practical use cases

Encode a search term before adding it to a query parameter, a filename before using it as one path segment, or a complete callback URL before placing it inside an OAuth-style parameter. Decode analytics links to inspect campaign values, investigate a malformed redirect, or read a copied query string. For structured work, prefer the platform's URL and URLSearchParams APIs because they preserve boundaries more reliably than string concatenation.

Encoding is not sanitization and does not make an untrusted destination safe. Applications must still validate allowed schemes and hosts, prevent open redirects, escape values for the output context, and avoid placing secrets in URLs. Query values can appear in browser history, server logs, screenshots, referrer data, and copied messages.

Privacy

Encoding and decoding run in your browser, so the submitted text does not need to leave your device. Avoid using real password-reset links, authorization codes, signed URLs, or customer identifiers anyway: clipboard history, browser extensions, and shared screens may expose them. The conversion removes no sensitive information; it only changes how characters are represented.

Common questions

Frequently asked questions

Should I encode a complete URL or only one part?

Usually, encode individual dynamic components such as a query value or path segment. Encoding a complete URL escapes structural punctuation and makes it unsuitable for direct navigation. Encode the whole address only when it is intentionally data inside another parameter, and then encode it exactly once.

Why is a space sometimes %20 and sometimes a plus sign?

General percent encoding represents a space as %20. Traditional HTML form encoding can represent a space as plus, which means a literal plus must be encoded separately. Use the convention expected by the receiving parser, especially when manually examining form submissions or query strings.

What does %25 mean?

%25 is the encoded form of the percent sign itself. Seeing %2520 often indicates that an existing %20 sequence was encoded again: percent became %25 while 20 remained. Decode one controlled layer at a time and fix the duplicate encoding at its source.

Does URL encoding protect sensitive data?

No. Anyone can reverse percent encoding, and URLs commonly appear in history, logs, analytics, screenshots, and referrer information. Keep passwords, private tokens, and personal data out of URLs whenever possible. Use HTTPS for transport security and appropriate authorization for access control.

Why does decoding fail on my input?

The value may contain an incomplete percent triplet, non-hexadecimal characters after a percent sign, truncated UTF-8 bytes, or a percent sign intended literally. Keep the original text, locate the first malformed sequence, and correct the producing system rather than asking the decoder to guess.