<!-- Markdown version of https://ocxly.com/url-encoder.html · auto-generated, may lag the live page -->

# URL Encoder / Decoder

Percent‑encode text for safe use in URLs, or decode it back to readable form — in real time as you type. Switch between component encoding and full‑URI encoding. Everything stays in your browser.

## What percent‑encoding does

URLs may only contain a limited set of characters. Anything else — spaces, `&`, `?`, `#`, non‑ASCII letters — must be **percent‑encoded**: replaced by a `%` followed by the byte's two‑digit hex value (a space becomes `%20`, an ampersand `%26`). This is defined by **RFC 3986**, the URI standard.

### Component vs full‑URI encoding

**Component** mode (`encodeURIComponent`) escapes almost everything, so it's what you want for a single query‑string *value* or path segment — it will encode `/`, `?`, `&` and `=`. **Full URI** mode (`encodeURI`) leaves those reserved characters intact so a whole address stays usable — use it on a complete URL, not on individual values. Picking the wrong one is the classic source of double‑encoding bugs.

### Decoding & errors

Decoding reverses the process. A malformed sequence — a stray `%` or an invalid hex pair like `%ZZ` — is not valid UTF‑8 and can't be decoded; the tool tells you rather than guessing. Both directions use the browser's native `encodeURIComponent`/`decodeURIComponent` (and the `encodeURI` pair), so results match exactly what your JavaScript will produce.

### Privacy

No text is uploaded — every transform runs on your device.

---
*Source: [ocxly.com/url-encoder.html](https://ocxly.com/url-encoder.html) — OCXLY, free 100% client-side privacy-first tools. Free online URL encoder and decoder. Percent-encode or decode text in real time, with component (encodeURIComponent) and full-URI (encodeURI) modes. Runs entirely in your browser.*
