Input
Select Mode:
Output
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
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.
Related Encoding & Developer Tools
Base64 Encoder
Encode and decode text or data to/from Base64 format for data transmission and API integration.
JSON Formatter
Format, validate, and beautify JSON data with real-time validation and minification.
Text Editor Pro
Advanced text editing with find/replace, multi-line editing, and transformation tools.
Text Replacer
Find and replace text with regex support, case sensitivity, and bulk replacements.
Text Case Converter
Convert text between uppercase, lowercase, title case, camelCase, snake_case, and more.
Word Counter
Count words, characters, sentences, and paragraphs with real-time statistics.