URL Encoder & Decoder
Encode and decode URLs and URL components directly in your browser.
encodeURIComponent(). Encodes reserved characters (&, =, ?, :, /). Best for query parameters and individual URL segments.Query Parameter Helper
Quickly build and encode a safe key=value query pair.
encodeURI vs. encodeURIComponent: Which Should You Use?
JavaScript provides two native global encoding methods. Selecting the wrong one can either break URL syntax or fail to protect query strings against injection issues:
| Feature | encodeURI() (Full URI) | encodeURIComponent() (Component) |
|---|---|---|
| Primary Purpose | Encodes an entire URL while preserving protocol and path structure | Encodes a single component or query parameter value |
| Preserved Characters | A-Z a-z 0-9 ; , / ? : @ & = + $ - _ . ! ~ * ' ( ) # | A-Z a-z 0-9 - _ . ! ~ * ' ( ) |
| Reserved Delimiters Encoded? | No (leaves :, /, ?, &, = intact) | Yes (converts to %3A, %2F, %3F, %26, %3D) |
| Best For | Whole URLs containing spaces or international characters | User inputs, query values, URL search params, path segments |
Common URL Percent-Encoding Codes
The table below lists the most frequently encountered ASCII characters and their percent-encoded hexadecimal equivalents:
Frequently Asked Questions
Everything you need to know about URL encoding, percent encoding, and browser standards.
Explore Related Tools
Fast, browser-based utilities for developers, designers, and creators.
Word Counter
Count words, characters, sentences, paragraphs and reading time in real time directly in your browser.
QR Code Generator
Create custom QR codes for URLs, text, email, phone numbers and Wi-Fi networks directly in your browser.
JSON Formatter & Validator
Format, validate, and minify JSON directly in your browser.