Skip to content
ToolZone

URL Encoder/Decoder

Encode special characters in a URL or query string into a safe format, or decode an already-encoded URL back into readable, human-friendly text.

Runs in your browser. Nothing you enter or upload leaves your device.

Result appears here

Encodes everything except letters, digits and - _ . ~. Use it for a single query value or path segment.

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the URL Encoder/Decoder

The URL Encoder/Decoder converts text to and from percent-encoding, the format URLs use for spaces, symbols, and non-ASCII characters. Choose Encode or Decode, paste your text, and the converted result appears as you type.

How it works

Component mode uses encodeURIComponent and also encodes ! ' ( ) * so the output follows RFC 3986 strictly: every character except letters, digits and - _ . ~ becomes its UTF-8 bytes written as %XX. Full URL mode uses encodeURI, which keeps : / ? # & = so a whole address still works. Form mode is like component mode but writes spaces as +, matching HTML form submissions.

Decode mode uses decodeURIComponent and, by default, turns + into a space first. If the input contains a % that is not followed by a valid two-digit hex code, or bytes that aren't valid UTF-8, an error explains the problem. When the input or result is an http or https URL, it is broken into its parts and every query parameter is listed with its decoded value.

How to use

  1. 1

    Choose Encode or Decode.

  2. 2

    Paste the text or URL into the box.

  3. 3

    Pick Component, Full URL or Form when encoding, or whether + means a space when decoding.

  4. 4

    Copy the result, or click Swap to run it back the other way. Your options are kept in the page link.

Worked examples

Query string value

Encoding form values with spaces and an ampersand.

Input
name=John Doe&city=New York
Result
name%3DJohn%20Doe%26city%3DNew%20York

Because the whole string is treated as one value, = and & are encoded too. Encode each value separately if you want to keep them as separators.

Nested URL

Passing a URL as a redirect parameter.

Input
https://example.com/a b?x=1
Result
https%3A%2F%2Fexample.com%2Fa%20b%3Fx%3D1

Decoding

Reading an encoded path segment.

Input
caf%C3%A9%20menu
Result
café menu
Limitations
The URL breakdown appears only for http and https URLs. Full URL mode doesn't encode & or = inside values; encode those values with Component mode first.
Assumptions
Text is UTF-8, the standard for URLs.
Privacy
Encoding and decoding happen in your browser; the text is not sent to any server.

Frequently asked questions

Why do URLs need encoding?+

Characters like spaces, &, ?, and # have special meaning in a URL or are not allowed at all, so they must be written as percent-encoded sequences to be sent safely.

What does %20 mean?+

It is the percent-encoded form of a space character: % followed by 20, the hexadecimal code for a space.

Why did https:// get encoded too?+

Component mode encodes : and / as well, because it's meant for a single value. Choose Full URL to encode a whole address while keeping it working.

Why do I see an error when decoding?+

The text contains a % that is not followed by two valid hex digits, or a byte sequence that is not valid UTF-8. The error message explains this.

Does it handle accented characters and emoji?+

Yes. They are converted to UTF-8 bytes and percent-encoded, and decoded back the same way.

Related tools