# URL Encoder

> Percent-encode text for safe use in URLs — as a query value or a full URL.

URL: https://uttir.com/url-encoder
Categories: developer-tools, encoding-tools
Privacy: Encoding runs locally in your browser. Nothing is uploaded.

## About

URLs may only contain a limited set of characters. Spaces, ampersands, question marks, and non-ASCII characters must be percent-encoded — replaced with %XX sequences. This tool offers two modes: component mode encodes everything reserved (for a single query parameter value), while full-URL mode keeps structural characters like : / ? & = so an entire address stays readable.

It matches the behavior of encodeURIComponent and encodeURI in JavaScript, so results are identical to what your code produces.

## How to use

1. **Pick a mode** — Component for a parameter value; full URL for an entire address.
2. **Paste your text** — The encoded output updates as you type.
3. **Copy the result** — Use Copy to place the encoded string on your clipboard.

## Examples

### Query value

Reserved characters are encoded in component mode.

Input:

```
a b&c=d
```

Output:

```
a%20b%26c%3Dd
```

### Full URL

Structure is preserved; only unsafe characters are encoded.

Input:

```
https://example.com/search?q=café & more
```

Output:

```
https://example.com/search?q=caf%C3%A9%20&%20more
```

## FAQ

### What is the difference between the two modes?

Component mode encodes every reserved character (&, =, ?, /, :), suitable for a single value. Full-URL mode leaves those intact so the URL still works as a URL.

### Is a space "%20" or "+"?

This tool uses %20, the standard percent-encoding. The "+" convention comes from HTML form submissions (application/x-www-form-urlencoded) and is a different format.

### When do I need to URL-encode?

Any time a value goes into a URL as a query parameter or path segment, and contains reserved characters (space, &, ?, #, /, +, etc.). Modern frameworks usually encode for you; this tool is for debugging and for hand-built URLs.

## Related tools

- [URL Decoder](https://uttir.com/url-decoder) — Decode percent-encoded URLs and query strings back into readable text.
- [Base64 Encoder](https://uttir.com/base64-encoder) — Encode any text — including emoji and non-Latin scripts — into standard Base64.
- [UTM Builder](https://uttir.com/utm-builder) — Add UTM campaign parameters to any URL so you can track traffic sources accurately in Google Analytics.

---

For the full HTML page with the live tool, visit https://uttir.com/url-encoder.
This file is the markdown rendering at https://uttir.com/url-encoder.md. See https://uttir.com/llms.txt for a site-wide summary.
