URL Encoder & Decoder

Instantly encode special characters for safe URL transmission or decode them back to a readable format.

Decoded URL
Encoded URL (Percent-Encoding)

How to Use the URL Encoder/Decoder

1. Input Your String

Type or paste your text or URL into either the "Decoded" or "Encoded" box. The tool works in both directions.

2. See Instant Conversion

As you type, the other box will update in real-time with the converted result using percent-encoding.

3. Copy or Clear

Use "Copy" to get the URL, "Copy as cURL" or "Copy as Wget" for a terminal command, or "Copy as Fetch" for a JavaScript snippet. Click "Clear" to start over.

URL Encoding FAQ

What is URL Encoding?

URL encoding, also known as percent-encoding, is a mechanism for encoding information in a URL. It converts characters that are not allowed in URLs into a safe format, like replacing a space with `%20`.

Why is URL Encoding necessary?

URLs can only be sent over the internet using the ASCII character set. Since URLs often contain characters outside this set, the URL must be converted. It also ensures that reserved characters (like `&`, `?`, `/`) don't break the URL structure when they are part of the data.

What's the difference between `encodeURI` and `encodeURIComponent`?

This tool uses `encodeURIComponent`, which is more aggressive. It encodes all characters that have a special meaning in a URL, making it perfect for encoding query parameters. `encodeURI` is less aggressive and assumes the input is a full URL, so it won't encode characters like `/`, `?`, and `&`.

What are the "Copy as..." features for?

These features provide ready-to-use code snippets. 'Copy as cURL' and 'Copy as Wget' wrap the URL in terminal commands for testing APIs or downloading content. 'Copy as Fetch' creates a JavaScript snippet for use in web applications.