# URL encoder and decoder

Encode and decode URLs and read query strings

Use it at https://www.quicktoolz.com/tools/url-encoder. From QuickToolz.

URL encoding, also called percent encoding, replaces unsafe characters with a percent sign and a code, so a space becomes %20. Use One value for a single piece of a link, and Whole URL to keep the slashes and question marks. When decoding, we also list the query string as a table.

## How it works

Unsafe characters become % followed by their hex code.

One value encodes everything except letters, numbers and a few marks. Whole URL leaves the structure of the link alone.

Worked example: A space becomes %20, and “a b&c” becomes a%20b%26c.

## Examples

| Text | Encoded |
| --- | --- |
| a b | a%20b |
| x=1&y=2 | x%3D1%26y%3D2 |
| é | %C3%A9 |
| 100% | 100%25 |

## What this tool doesn't cover

- Decoding needs valid percent codes, so a stray % gives an error.

## Questions

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

One value also encodes / ? and &. Use it for a single value inside a link.

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

Both appear. %20 works everywhere, and + is only for form data.

### Is my data uploaded?

No. Everything runs in your browser.

### What is URL encoding?

It swaps characters that aren’t safe in a web address for a % and a code. A space becomes %20, for example.

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

When a value contains spaces, symbols or non-English letters, such as a search term in a link. Otherwise the link can break.

## Sources

- [RFC 3986: URI Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986)