# URL Encoder / Decoder

Canonical URL: https://offlineutils.com/url-encoder
Category: Developer
Published: 2026-06-24
Publisher: offlineutils.com
Runs entirely in the browser; nothing entered into the tool is uploaded.

> A URL Encoder/Decoder converts text to and from percent-encoded form (also called URL encoding), making strings safe to use inside query parameters, fragments, and path segments — all processed locally in your browser.

Choose component or full-URI mode. Component mode uses encodeURIComponent / decodeURIComponent, which encodes characters like '&', '=', and '/' that have special meaning in URLs — appropriate for individual query values. Full-URI mode uses encodeURI / decodeURI, which preserves URL structure. The tool runs on the Web platform's native URL primitives.

## Features

- Encode and decode URL components with encodeURIComponent / decodeURIComponent
- Full-URI mode using encodeURI / decodeURI that preserves URL structure
- Toggle between '+' (form-urlencoded) and '%20' encoding for spaces
- Side-by-side panes with live output
- Built on the platform's native URL primitives — no library round-trip

## Use cases

- Encoding a search query before stitching it into a URL
- Decoding a tracking parameter to see the actual value
- Spotting double-encoded values that need a second decode pass
- Building a deep link with reserved characters in the query string

## How to use it

1. **Paste your text** — Paste into the encode pane for raw text, or the decode pane for a percent-encoded string.
2. **Pick the mode** — Component mode escapes every reserved character. Full-URI mode preserves URL structure.
3. **Copy the result** — Click Copy on either pane to put the value on your clipboard.

## When to use it, and when to use something else

- **vs encodeURIComponent in a browser console** — use URL Encoder / Decoder when you want a UI with mode toggle and decode round-trip without opening DevTools. Use encodeURIComponent in a browser console when you are already scripting and want the raw primitive.

## Frequently asked questions

### When should I use encodeURI vs encodeURIComponent?

Use encodeURIComponent for individual URL pieces like query-string values or path segments. Use encodeURI for an entire URL when you want to leave reserved characters like '/', ':' and '?' intact.

### Why does '+' decode to a space sometimes?

The classic application/x-www-form-urlencoded format encodes spaces as '+'. Modern URI encoding uses '%20'. Switch modes if your output looks wrong — this tool exposes both behaviors.

### Is URL encoding the same as Base64?

No. URL encoding only escapes the small set of characters that have special meaning in URLs. Base64 transforms binary data into an ASCII string. They solve different problems.

## Related tools

- https://offlineutils.com/url-parser
- https://offlineutils.com/base64
- https://offlineutils.com/json-formatter
