---
title: "URL Encode & Decode - Online Percent Encoder | CanDoYa"
description: "Free online URL encoder and decoder. Convert text to percent-encoding and back instantly, with full Unicode support. No upload, runs in your browser."
url: https://candoya.com/tools/url-encode-decode/
locale: en
type: browser-tool
---

# URL Encode and Decode

Category: Developer

## What is URL encoding?

URL encoding (also called percent-encoding) rewrites characters that aren't safe in a URL - spaces, accents, emoji, ampersands - as `%` followed by their UTF-8 byte values. This tool encodes text into URL-safe form and decodes it back in your browser, with three modes for a single value, a whole URL, or an HTML-form query string.

Encoding runs as you type and stays on your device - your text is never uploaded, which makes it safe for tokens, redirect URIs and private query strings. Pick **Component** for a single query value or path segment, **Full URL** when the input is already a whole URL with non-ASCII text, and **Form** for HTML form submissions where a space is `+`.

## How to use it

1. **Pick a direction** - Choose Encode to turn text into a URL-safe form, or Decode to turn percent-encoded text back into text.
2. **Pick a mode** - Component encodes a single value (the most common case), Full URL preserves the URL structure, and Form uses + for a space.
3. **Paste your input** - Type or paste into the input box - the result updates live in the panel beside it.
4. **Copy the result** - Copy the output and paste it wherever you need it. Invalid percent escapes show a clear message instead of garbled text.

## Who it's for

- **Building query strings** - turn a name like `café & co` into `caf%C3%A9%20%26%20co` so it survives in a URL.
- **Reading server logs** - paste a request line and decode it to see the human-readable query and path.
- **OAuth and redirects** - encode a `redirect_uri` or `state` value so it round-trips intact through the provider.
- **HTML form data** - decode an `application/x-www-form-urlencoded` body where spaces are represented as `+`.

## Expert note

encodeURIComponent leaves five characters un-encoded that RFC 3986 actually treats as reserved sub-delimiters: `!`, `*`, `'`, `(` and `)`. They're fine in 99% of URLs, but if a stricter parser rejects them you can encode them by hand as `%21 %2A %27 %28 %29`. The space rule is the other classic gotcha: in a path or query value spaces are `%20`, but in an HTML form body they're `+` - which is why we offer the Form mode separately.

## Frequently asked questions

### Is this URL encoder free?

Yes - it's completely free, with no sign-up and no usage limits. Encoding and decoding both run in your browser.

### Is my data uploaded anywhere?

No. Your text is processed locally in your browser and never sent to a server, so it's safe for tokens, OAuth redirect values and private query strings.

### What is the difference between Component, Full URL and Form modes?

Component (encodeURIComponent) encodes a single query value or path segment - it percent-encodes `& = ? /` too. Full URL (encodeURI) keeps those structural characters as-is, which is what you want for a whole URL. Form is like Component but a space is `+` instead of `%20` - the HTML `application/x-www-form-urlencoded` rule.

### Does it handle emoji, accents and non-Latin scripts?

Yes. Characters outside ASCII are encoded as their UTF-8 bytes - `é` becomes `%C3%A9`, `🌍` becomes `%F0%9F%8C%8D` - and decoded back to the original text.

### Why is a space sometimes %20 and sometimes +?

`%20` is the universal percent-encoding for a space. The plus form (`+`) is only used inside `application/x-www-form-urlencoded` data - that is, the body of an HTML form POST or the query string of a form submission. Use the Form mode for those; use Component or Full URL everywhere else.

### Why do I get "Invalid URL encoding"?

The input contains a `%` that isn't followed by two hex digits (for example `%G1` or a trailing `%`), or the percent-bytes don't form valid UTF-8. Fix the broken sequence or paste the original encoded string again.

### Can I encode an already-encoded string?

You can, but every `%` in the input becomes `%25`, so the result is doubly encoded. Decode first if your input is already percent-encoded - or use the Decode direction.

## Related tools

- [Base64 Encode and Decode](https://candoya.com/tools/base64-encode-decode/)
- [JSON Formatter](https://candoya.com/tools/json-formatter/)
- [HTML Entity Encode and Decode](https://candoya.com/tools/html-entity-encode-decode/)
- [JWT Decoder](https://candoya.com/tools/jwt-decoder/)

---

*Markdown edition of <https://candoya.com/tools/url-encode-decode/>, published for AI agents and other automated readers. Index of key pages: <https://candoya.com/llms.txt>.*
