URL Encoder / Decoder
Encode or decode URLs and query parameters instantly. Switch between full URL encoding and component encoding.
Common URL characters reference
| Char | Encoded | Note |
|---|---|---|
| %20 | space | |
| & | %26 | ampersand |
| = | %3D | equals |
| + | %2B | plus |
| ? | %3F | question mark |
| # | %23 | hash |
| / | %2F | slash (component) |
| : | %3A | colon (component) |
| @ | %40 | at (component) |
| % | %25 | percent |
How to use URL Encoder / Decoder
The URL Encoder / Decoder converts special characters in URLs to and from their percent-encoded equivalents. Spaces, non-ASCII letters, and reserved characters such as &, =, and # must be percent-encoded before being included in a URL query string or path segment. This tool is essential when constructing API calls, debugging HTTP requests and embedding dynamic values in links.
- Paste the text or URL you want to encode or decode into the input field.
- Choose Encode to convert special characters to %XX sequences.
- Choose Decode to convert %XX sequences back to readable characters.
- Select the encoding scope: encode full URL (preserves ://) or encode component (encodes everything including :, /, ?).
- Copy the result from the output panel.
Your data never leaves your device — 100% private processing.
Percent-encoding rules
Percent-encoding replaces each unsafe byte with a % sign followed by two uppercase hexadecimal digits representing that byte value. RFC 3986 defines unreserved characters (A–Z, a–z, 0–9, -, _, ., ~) which must never be encoded. Reserved characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) have special meaning in URLs and must be encoded when used as literal data in a component. A space is encoded as %20 (or + in application/x-www-form-urlencoded form data).
encodeURI vs encodeURIComponent
JavaScript provides two built-in functions for URL encoding. encodeURI is intended for a complete URL and leaves reserved characters (/, ?, #, &, =, :) intact so the URL structure remains valid. encodeURIComponent encodes all characters except unreserved ones, making it safe for encoding individual query parameter names and values. Always use encodeURIComponent for user-supplied data in query strings to prevent injection of additional parameters.
| Character | encodeURI | encodeURIComponent |
|---|---|---|
| Space | %20 | %20 |
| / | preserved | %2F |
| ? | preserved | %3F |
| # | preserved | %23 |
| & | preserved | %26 |
| = | preserved | %3D |
| @ | preserved | %40 |
Glossary
- Percent-encoding
- Replacing unsafe URL characters with a % followed by two hex digits representing the byte value.
- Query string
- The part of a URL after ? containing key=value pairs separated by & characters.
- URI
- Uniform Resource Identifier — a string that identifies a resource by location, name, or both.
- Reserved characters
- Characters with special meaning in URI syntax (/, ?, #, &, =, etc.) that must be encoded when used as literal data.
- IDN
- Internationalized Domain Name — a domain name containing non-ASCII characters, encoded using Punycode.
Related reading
Frequently Asked Questions
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
Why use URL Encoder / Decoder?
- No installation — use directly from any browser
- Handles large inputs without crashing or timeouts
- Syntax highlighting and formatted output for readability
- Copy to clipboard shortcut for fast workflow integration
Common use cases
- Validate and format JSON responses from APIs
- Encode/decode Base64 strings during debugging
- Generate UUIDs for database seeds or test data
- Minify CSS or JavaScript before deployment
- Diff two code snippets to spot regressions
Related Developer Tools
HTML Encoder / Decoder
Encode and decode HTML entities online. Escape <, >, &, and quote characters for safe HTML display. Free, instant, and private — runs in your browser.
Base64 Encoder & Decoder
Encode text or files to Base64, or decode Base64 strings back to text. Fast, free, and runs entirely in your browser.
JSON Formatter & Validator
Format, validate, and minify JSON instantly. Includes syntax highlighting, error detection, and a collapsible tree view — free, private, in-browser.
Regex Tester
Test and debug regular expressions online. See live matches, capture groups, and replace output. Free, private, instant.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes online. Hash text or files privately in your browser.
Hash Generator
Generate cryptographic hashes online. Support for SHA-1, SHA-256, SHA-384, and SHA-512. Instant, secure, client-side.
Explore all Developer Tools.