URL Encoder
/ Decoder — Free
Online Tool
Encode, decode & parse URLs instantly. Supports encodeURIComponent, encodeURI, and RFC 3986 modes. Full Unicode/UTF-8 support, real-time output, double-encoding detection. 100% client-side — your data never leaves your browser.
How to URL Encode Text Online — 3 Simple Steps
Convert any text, query parameter, or special character to percent-encoded format in seconds.
Enter Text or URL
Paste any text, query string parameter, full URL, or special characters into the input field. The tool handles any Unicode/UTF-8 text including emojis, CJK characters, and international scripts.
Choose Encoding Mode
Select your encoding standard: encodeURIComponent for query parameters, encodeURI for full URLs, RFC 3986 Strict for API compliance, or Form Data for HTML form submissions. Each mode encodes a different set of characters.
Copy the Result
Get your percent-encoded output instantly — in real-time as you type, or click the Encode button. Copy to clipboard, Download as a file, or Swap input/output to chain encode-decode operations.
Why Use This Free URL Encoder Decoder Online
Choose the right mode for your use case: encodeURIComponent for query parameters, encodeURI for full URLs (preserves : / ? #), RFC 3986 Strict for maximum compatibility, or Form Data (uses + for spaces per application/x-www-form-urlencoded).
Output updates instantly as you type — no need to click a button. Toggle real-time mode on or off based on your preference. Perfect for debugging query strings and API parameters on the fly.
Live outputDecompose any URL into its constituent parts: protocol, host, port, path, query parameters (key-value pairs), and fragment/hash. Essential for debugging complex URLs, deep links, and API endpoints.
Full breakdownAutomatically detects if your input already contains percent-encoded characters and warns you before encoding again. Double-encoding is one of the most common URL bugs — this feature prevents it.
Bug preventionEverything runs in your browser using JavaScript's native encodeURIComponent() and decodeURIComponent() functions. Your text and URLs never leave your device. Safe for API keys, auth tokens, and internal endpoints.
Correctly encodes and decodes all Unicode characters — emojis (🎉 → %F0%9F%8E%89), CJK characters, Arabic, Cyrillic, accented letters, and every international script. Multi-byte sequences handled correctly per UTF-8 spec.
WebToolTrix vs Other URL Encoders
| Feature | 🔗 WebToolTrix | UrlEncoder.org | Meyerweb | FreeFormatter | w3schools |
|---|---|---|---|---|---|
| encodeURIComponent mode | ✔ | ✔ | ✘ | ✔ | ⚠ |
| encodeURI mode | ✔ | ✘ | ✘ | ✔ | ✘ |
| RFC 3986 Strict | ✔ | ✘ | ✘ | ✘ | ✘ |
| Form Data (+ for space) | ✔ | ✔ | ✘ | ✘ | ✘ |
| URL Parser | ✔ Full | ✘ | ✘ | ✘ | ✘ |
| Real-time output | ✔ | ✘ | ✘ | ✘ | ✘ |
| Double-encode detection | ✔ | ✘ | ✘ | ✘ | ✘ |
| Swap input/output | ✔ | ✘ | ✘ | ✘ | ✘ |
| Unicode/Emoji support | ✔ | ✔ | ✔ | ✔ | ✔ |
| Download output | ✔ | ✘ | ✘ | ✘ | ✘ |
| Client-side only | ✔ | ✘ | ✔ | ✘ | ✔ |
| No ads | ✔ | ✘ | ✔ | ✘ | ✘ |
Free URL Encoder Decoder Online — The Complete Guide
URLs can only contain a limited set of ASCII characters. Spaces, ampersands, forward slashes, Unicode text, and dozens of other characters must be percent-encoded before they can safely appear in a URL. A free URL encoder decoder online converts these characters to their %XX hexadecimal equivalents — and reverses the process when you need to read encoded URLs. WebToolTrix's URL encoder supports 4 encoding standards, real-time output, URL parsing, and double-encoding detection — all 100% client-side.
What Is URL Encoding?
URL encoding (also called percent-encoding) is the process of replacing unsafe characters in a URL with a % sign followed by their hexadecimal ASCII/UTF-8 value. It's defined by RFC 3986 — the standard that governs URI syntax.
For example:
- Space →
%20(or+in form data) - Ampersand
&→%26 - Forward slash
/→%2F - Question mark
?→%3F - Equals
=→%3D
Without URL encoding, browsers and servers can't distinguish between a & that separates query parameters and a literal & that's part of the data.
URL Encoding of Space — %20 vs +
The most common URL encoding question: how is a space encoded? The answer depends on the context:
| Context | Space Encoding | Standard |
|---|---|---|
| URL path / query (general) | %20 | RFC 3986 |
| HTML form submission | + | application/x-www-form-urlencoded |
JavaScript encodeURIComponent() | %20 | RFC 3986 |
JavaScript encodeURI() | %20 | RFC 3986 |
PHP urlencode() | + | Form encoding |
PHP rawurlencode() | %20 | RFC 3986 |
Python urllib.parse.quote() | %20 | RFC 3986 |
Java URLEncoder.encode() | + | Form encoding |
Rule of thumb: Use %20 for URL paths and API endpoints (RFC 3986). Use + only for HTML form submissions. WebToolTrix lets you choose the right mode for your use case.
URL Encoding Characters — Complete Reference
Here's a complete reference of common URL encoding characters and their percent-encoded equivalents:
| Character | URL Encode | Description |
|---|---|---|
| (space) | %20 | Space character |
| ! | %21 | Exclamation mark |
| # | %23 | Hash / fragment |
| $ | %24 | Dollar sign |
| & | %26 | Ampersand (query separator) |
| ' | %27 | Single quote / apostrophe |
| ( | %28 | Opening parenthesis |
| ) | %29 | Closing parenthesis |
| * | %2A | Asterisk |
| + | %2B | Plus sign |
| , | %2C | Comma |
| / | %2F | Forward slash (path separator) |
| : | %3A | Colon (protocol separator) |
| ; | %3B | Semicolon |
| = | %3D | Equals (key-value separator) |
| ? | %3F | Question mark (query start) |
| @ | %40 | At sign |
| [ | %5B | Opening bracket |
| ] | %5D | Closing bracket |
URL Encode in JavaScript
JavaScript provides three built-in functions for URL encoding in JS:
| Function | Encodes | Preserves | Use Case |
|---|---|---|---|
encodeURIComponent() | All special chars | Only - _ . ! ~ * ' ( ) | Query parameters, form values |
encodeURI() | Non-URL chars | : / ? # [ ] @ ! $ & ' ( ) * + , ; = | Full URLs with structure |
escape() ⚠️ | Some chars | Various | Deprecated — never use |
encodeURIComponent() for individual query parameters: const url = '/search?q=' + encodeURIComponent(userInput); Use encodeURI() only when you have a complete URL string with structure that should be preserved.For URL decoding in JavaScript, the corresponding functions are decodeURIComponent() and decodeURI(). Never use unescape() — it's deprecated and doesn't handle UTF-8 correctly.
URL Encode in PHP
PHP offers two functions for URL encoding in PHP — and choosing the wrong one is a common source of bugs:
urlencode($str)— Encodes spaces as+. Followsapplication/x-www-form-urlencodedformat. Use for HTML form data.rawurlencode($str)— Encodes spaces as%20. Follows RFC 3986. Use for URL paths and API endpoints.urldecode($str)/rawurldecode($str)— The corresponding decoders.
Common mistake: Using urlencode() for path segments. Since + is a valid literal character in URL paths, this causes bugs. Always use rawurlencode() for paths.
URL Encode in Python
Python's urllib.parse module provides comprehensive URL encoding in Python:
urllib.parse.quote(string, safe='/')— RFC 3986 encoding. Thesafeparameter specifies characters to not encode (default:/).urllib.parse.quote_plus(string)— Form encoding with+for spaces.urllib.parse.unquote(string)— Decode percent-encoded strings.urllib.parse.urlencode(dict)— Encode a dictionary of query parameters into a query string.
URL Encoder Java
Java's URL encoder class is java.net.URLEncoder:
URLEncoder.encode(str, "UTF-8")— Encodes spaces as+(form encoding). Always specify "UTF-8" — the deprecated single-argument version uses the platform's default charset, which causes bugs.URLDecoder.decode(str, "UTF-8")— The corresponding Java URL decoder.
Important: Java's URLEncoder follows the application/x-www-form-urlencoded format, not RFC 3986. For RFC 3986 compliance, replace + with %20 after encoding, or use a library like Apache Commons' URIBuilder.
URL Encoding for Ampersand (&)
The URL encoding for ampersand is %26. This is critical because & is a reserved character that separates query parameters. If your data contains a literal ampersand, it must be encoded:
- Correct:
/search?company=AT%26T(AT&T encoded as data) - Wrong:
/search?company=AT&T(browser seesTas a separate parameter)
In HTML attributes, the ampersand must also be HTML-encoded: &. So a URL in an href might look like: href="/search?a=1&b=2".
URL Encode Forward Slash (/)
The URL encoding for forward slash is %2F. Forward slash is a reserved character used to separate path segments. You only need to encode it when it's part of data, not structure:
- Don't encode:
/api/users/123(slashes are structural path separators) - Do encode:
/search?path=%2Fusr%2Flocal%2Fbin(slashes are part of a data value)
encodeURIComponent() encodes / as %2F. encodeURI() preserves / because it assumes the input is a full URL with structural slashes.
Base64 URL Encoder
A Base64 URL encoder converts binary data or text to a URL-safe Base64 format. Standard Base64 uses +, /, and = — all of which are reserved in URLs. Base64URL replaces them:
+→-(hyphen)/→_(underscore)=→ removed (padding stripped)
Base64URL is used in JWTs (JSON Web Tokens), OAuth, and data URIs. WebToolTrix offers a dedicated Base64 Encoder/Decoder for Base64 operations. This page focuses on percent-encoding (%XX format).
Proofpoint URL Decoder
Proofpoint, a corporate email security platform, wraps all links in emails with its own encoded redirect URLs for security scanning. A Proofpoint URL decoder extracts the original URL from Proofpoint's wrapper format. WebToolTrix's URL decoder can decode the percent-encoded portions of Proofpoint URLs — paste the full Proofpoint link, decode it, and extract the original destination URL from the decoded output.
Short URL Decoder
A short URL decoder (or URL expander) reveals the destination of shortened links from services like bit.ly, tinyurl, or t.co. This requires following HTTP redirects — which is a different operation from percent-encoding/decoding. WebToolTrix's URL decoder handles the percent-encoding aspect. For expanding shortened URLs, you'll need a dedicated URL expander tool or simply paste the short URL in your browser's address bar.
HTTP URL Decoder — Reading Raw HTTP
When working with raw HTTP traffic (from tools like curl, Postman, Fiddler, or browser DevTools), query strings and form bodies are percent-encoded. An HTTP URL decoder converts these back to readable text. Paste the encoded query string from your HTTP logs into WebToolTrix's decoder with "Decode + as space" enabled for form-encoded data.
Common Mistakes
- Double-encoding: Encoding a string that's already encoded turns
%20into%2520. WebToolTrix's double-encoding detection prevents this - Wrong function: Using
encodeURI()for query parameters (it won't encode&,=,?). Always useencodeURIComponent()for parameters - Encoding the entire URL: Don't encode structural characters like
://,/,?,#in a full URL. Only encode individual parameter values - Forgetting UTF-8: Always specify UTF-8 encoding in Java, PHP, and Python. Platform defaults can cause mojibake (garbled characters)
- Confusing URL encoding with security: Percent-encoding is a formatting standard, not a security mechanism. Never use it to "hide" sensitive data
Privacy
WebToolTrix's URL encoder/decoder is 100% client-side — your text, URLs, API keys, and auth tokens are processed entirely in your browser and never sent to any server. Safe for production debugging and sensitive endpoints.
URL Encoder Decoder — Frequently Asked Questions
% sign followed by their hexadecimal value. For example, a space becomes %20 and an ampersand becomes %26. This is defined by RFC 3986 and ensures URLs are transmitted correctly across all systems.%20. In HTML form submissions (application/x-www-form-urlencoded), a space is encoded as +. WebToolTrix offers both modes — use %20 for URLs and API endpoints, + for form data.encodeURIComponent() encodes everything except - _ . ! ~ * ' ( ) — use it for individual query parameters. encodeURI() preserves URL-structural characters like : / ? # & = — use it only when encoding a complete URL. Using encodeURI() for parameters is a common bug.encodeURIComponent(str) for individual values: const url = '/search?q=' + encodeURIComponent(userInput); Use encodeURI(fullUrl) for complete URLs. For decoding: decodeURIComponent(str) and decodeURI(str). Never use the deprecated escape()/unescape() functions.rawurlencode($str) for RFC 3986 encoding (spaces = %20). Use urlencode($str) for form encoding (spaces = +). The corresponding decoders are rawurldecode() and urldecode(). Always use rawurlencode() for URL path segments.urllib.parse.quote(string) for RFC 3986 encoding and urllib.parse.quote_plus(string) for form encoding. Use urllib.parse.urlencode(dict) to encode a dictionary of query parameters into a query string. Always import from urllib.parse (Python 3).%26. This is critical because & is a reserved character that separates query parameters. If your data contains a literal ampersand (like company name "AT&T"), it must be encoded as %26 in the URL.+ with -, / with _, and removing = padding. It's used in JWTs and OAuth tokens. This tool handles percent-encoding (%XX format). For Base64, use our dedicated Base64 Encoder/Decoder.encodeURIComponent() and decodeURIComponent() functions. Your text, URLs, API keys, and tokens never leave your device. You can verify this in your browser's DevTools Network tab.%20 is the percent-encoded representation of a space character (ASCII code 32, hex 20). It's the standard way to represent spaces in URLs per RFC 3986. Example: "hello world" → "hello%20world".URLEncoder.encode(str, "UTF-8") — always specify "UTF-8". Java's encoder uses form encoding (+ for spaces). For RFC 3986 compliance, replace + with %20 after encoding. For decoding: URLDecoder.decode(str, "UTF-8").Other Free Dev & Web Tools
Encode & Decode URLs — Free Right Now
4 encoding modes · Real-time output · URL parser · Double-encoding detection · 100% client-side · No signup. Free forever.