What Is URL Encoding (Percent Encoding)?
URL encoding (officially called "percent encoding") converts characters that aren't valid in URLs into a safe format. Each unsafe character is replaced by a percent sign followed by its two-digit hexadecimal ASCII code. For example, a space becomes %20, the ampersand & becomes %26, and the equals sign = becomes %3D.
URLs can only contain a limited set of ASCII characters. Any other character — spaces, letters with accents, Chinese characters, symbols — must be percent-encoded to be safely transmitted in a URL string.
Common Example: A search query like "café au lait" becomes caf%C3%A9%20au%20lait in a URL. The space becomes %20, and the accented é becomes %C3%A9 (its UTF-8 byte sequence in hex).
Encoding vs Decoding
| Operation | Input | Output | Use Case |
|---|---|---|---|
| Encode | Plain text / full URL | Percent-encoded URL | Building URL query params, API requests |
| Decode | %20-encoded URL string | Human-readable URL | Reading encoded URLs from logs or responses |
How to Encode or Decode a URL
Select Mode
Choose Encode (plain text → URL-safe) or Decode (percent-encoded → readable text).
Paste Your Input
Enter the text or URL to encode, or paste the percent-encoded URL to decode.
Copy the Output
The result appears instantly. Copy to use in your API call, browser address bar, or code.
Which Characters Get Encoded?
Always encoded: spaces, < > # % { } | \ ^ [ ] ` and any non-ASCII characters (accented letters, CJK, Arabic, emoji).
Unreserved characters (never encoded): A–Z, a–z, 0–9, hyphen (-), underscore (_), period (.), tilde (~).
Reserved characters (encoded in components, not in full URLs): : / ? # [ ] @ ! $ & ' ( ) * + , ; =
Full URL Encoding vs Component Encoding
Full URL encoding (encodeURI in JavaScript): encodes everything except characters that have meaning in a URL structure (/, ?, #, &, =). Use when encoding a complete URL that already has its structure.
Component encoding (encodeURIComponent): encodes everything including /, ?, #, &, = — treating the input as a value to go inside a URL parameter. Use when encoding a query parameter value that might contain those characters.
Encode/Decode URLs Free
Full URL and component encoding modes. Instant output, copy with one click.
Open URL EncoderURL Encoding in Practice
- Building query strings:
?search=hello%20world&lang=urdu%2Fenglish - Passing data in GET requests where values contain special chars
- Decoding URLs copied from browser address bars for readability
- Reading percent-encoded values in server access logs
- Ensuring URLs with non-ASCII content (Arabic, Chinese, etc.) work correctly
ToolMatrix URL Encoder/Decoder
Encode and decode URLs with full URL mode and component mode. Handles all character sets including UTF-8 encoded non-Latin scripts. Instant output, one-click copy. Browser-based, free, no account needed.