# URL Encoder & Decoder — Encode Query Parameters Online

> Encode or decode URL text and query parameters locally with encodeURIComponent, encodeURI, and their decode functions.

Source: https://toolpantry.app/url-encoder-decoder

## About

Encode query values, encode a complete URI, or decode percent-escaped text locally with the browser's native URL functions.

## Quick answer

**How do I encode a URL?** Paste text or a URL to percent-encode or decode it instantly.

## How to encode or decode a URL

1. **Choose the mode** — component encoding for individual values, full-URI for whole links.
2. **Paste the text** — encoded or plain.
3. **Copy the result** — safe for query strings, redirects, and API calls.

## The everyday debugging cases

- A tracking parameter broke because an ampersand inside a value was not encoded
- Reading a URL full of percent signs and guessing wrong
- Passing a redirect target as a query parameter — needs component encoding

## Good to know

Component encoding escapes reserved characters inside a single value; full-URI encoding keeps the structural characters (:, /, ?) readable. Double-encoding is the classic bug — encode once, at the point where the value enters the URL. And in form bodies, spaces are + while in paths they are %20.

## Notes

Use component encoding for individual query values. Full URI encoding keeps URL separators such as :, /, and ? readable where possible.

## FAQ

**What is the difference between encodeURI and encodeURIComponent?**

encodeURI is intended for a complete URI and preserves structural separators. encodeURIComponent is intended for one value such as a query parameter.

**Why did decoding fail?**

The input may contain a stray percent sign or an incomplete escape sequence. Copy the encoded value exactly and try again.
