All Tools

URL Encoder / Decoder

Encode and decode URLs and URI components online

Input

Output

encodeURI vs encodeURIComponent:
encodeURI encodes a full URL but preserves : / ? # [ ] @ ! $ & ' ( ) * + , ; =
encodeURIComponent encodes everything except A-Z a-z 0-9 - _ . ~ — use this for query parameter values.

How URL Encoding Works

URL encoding (percent-encoding) replaces unsafe characters with a % followed by two hexadecimal digits representing the character's UTF-8 byte value.

Common Encodings

When to Use

Frequently Asked Questions

What is URL encoding?
URL encoding replaces unsafe ASCII characters with a '%' followed by two hex digits. For example, a space becomes %20. This ensures URLs are transmitted correctly.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URI but preserves characters like :, /, ?, #, &. encodeURIComponent encodes everything except letters, digits, and - _ . ~ making it ideal for query parameter values.
When should I use URL encoding?
Use URL encoding when passing special characters in query parameters, form data, or any text that will be part of a URL to prevent breaking the URL structure.

Answers, not just a number

Short, exact answers to the questions people ask alongside this tool — the number first, then the working.

For teams, not just visitors

Want this calculator on your own site?

We build the calculators on SnoopTool as embeddable widgets in your branding, wired to your own lead form — the same maths, your colours, your domain, your leads. Tell us which one and we will send back a working demo you can put in front of your team.

One reply from a person, within one business day. No newsletter, no sequence. See our privacy policy.