Input

Select Mode:

IN
Input
0 chars

Output

OUT
Output
0 chars

URL Encoding Explained

encodeURIComponent

Encodes all characters except: A-Z a-z 0-9 - _ . ! ~ * ' ( )

Use for: Query parameters, form data

encodeURI

Preserves URL structure (keeps: : / ? # [ ] @ ! $ & ' ( ) * + , ; =)

Use for: Complete URLs with special characters

Real-time encoding/decoding
4 encoding methods
Swap input/output
Live statistics

Complete Guide to URL Encoding & Decoding

What is URL Encoding?

URL encoding (also called percent encoding) converts characters into a format that can be safely transmitted over the internet. Special characters are replaced with "%" followed by two hexadecimal digits representing the character's ASCII code. This ensures URLs work correctly regardless of the characters they contain.

encodeURIComponent vs encodeURI

encodeURIComponent: Encodes ALL special characters except A-Z a-z 0-9 - _ . ! ~ * ' ( ). Use for query parameters, form values, and any user data that will be part of a URL.

encodeURI: Encodes fewer characters, preserving URL structure characters like : / ? # [ ] @ ! etc. Use this when encoding a complete URL that already has the correct structure.

Common URL Encoding Examples

Original: "hello world" Encoded: "hello%20world"

Original: "user@email.com" Encoded: "user%40email.com"

Original: "50% off" Encoded: "50%25%20off"

Original: "a&b=c" Encoded: "a%26b%3Dc"

Privacy & Security

All URL encoding and decoding is performed entirely in your web browser using JavaScript. Your URLs and data are never uploaded to our servers, stored, logged, or transmitted to any third party.