URL Encoder & Decoder
Encode and decode URLs with multiple modes and comprehensive analysis
Common Use Cases
Basic URL Encoding
Encode spaces and special characters in URLs.
Original: https://site.com/search?q=hello world
Encoded: https://site.com/search?q=hello%20worldPath Parameters
Safely encode path segments with special characters.
Original: /users/john doe/profile
Encoded: /users/john%20doe/profileDetails
This tool helps you convert special characters into URL-safe format and vice versa. It's particularly useful when working with URLs containing special characters, spaces, or non-ASCII characters like Turkish letters (ğ, ş, ı, etc.). URL encoding replaces unsafe ASCII characters with a '%' followed by two hexadecimal digits.
More Examples
Encoding Special Characters in URLs
Original: https://example.com/search?q=mavi kalem&category=kırtasiye
Encoded: https://example.com/search?q=mavi%20kalem&category=k%C4%B1rtasiyeSpaces are converted to %20, and Turkish characters like 'ı' are encoded to their UTF-8 representation.
Encoding Turkish Domain Names
Original: https://örnek.com/ürünler
Encoded: https://%C3%B6rnek.com/%C3%BCr%C3%BCnlerTurkish characters in domain names and paths are encoded: 'ö' becomes %C3%B6, 'ü' becomes %C3%BC
Encoding Email Addresses
Original: örnek@şirket.com
Encoded: %C3%B6rnek@%C5%9Firket.comEmail addresses with special characters can be encoded for use in URLs or HTML attributes.
Encoding Query Parameters
Original: product=Beyaz Eşya&price=1000₺&filter=çamaşır makinesi
Encoded: product=Beyaz%20E%C5%9Fya&price=1000%E2%82%BA&filter=%C3%A7ama%C5%9F%C4%B1r%20makinesiQuery parameters often need encoding to handle spaces, currency symbols, and special characters correctly.
Examples
Component-encode a query value
name=Ada Lovelace&role=admin!name%3DAda%20Lovelace%26role%3Dadmin!`encodeURIComponent` percent-encodes reserved characters like `=` and `&`, and spaces become `%20`, so the value is safe to drop into a query string. A few characters — `!`, `'`, `(`, `)`, `*` — are left as-is by the spec.
Full-URL encode — preserves the URL's structure
https://example.com/path with spaces?q=çhttps://example.com/path%20with%20spaces?q=%C3%A7`encodeURI` leaves reserved delimiters (`:`, `/`, `?`, `=`, `&`) intact so the URL still parses, while encoding spaces and non-ASCII bytes.
Decode percent-encoded text — including non-ASCII
%E4%B8%AD%E6%96%87%20%2B%20signs中文 + signsEach `%XX` triple is one byte of UTF-8; reassembled, the percent-encoded bytes decode back to the original characters.
About this tool
Percent-encoding replaces characters a URL cannot carry safely with a % plus two hex digits: a space becomes %20, & becomes %26. RFC 3986 defines the reserved set. Paste text and press Encode or Decode — the page checks for %XX sequences and picks the direction automatically.
Five modes cover different jobs: URI Component escapes everything (encodeURIComponent), Full URI keeps / and : intact (encodeURI), Query String encodes each name and value between & and =, URL Path treats each slash-separated segment, and Custom encodes only the characters you list. Size and character stats show what changed.
How to use this tool
Paste the input
Drop in a URL, a query string, form data, or an already-encoded fragment.
Pick a mode
Leave auto-detection on, or choose one of the five encoding modes yourself.
Run the conversion
Press Encode or Decode and read the result with its size and character stats.
Copy the output
Move the converted string straight into your code, config, or address bar.
Use cases
Building safe query strings
Concatenate `?` + `encodeURIComponent(key) + "=" + encodeURIComponent(value)` and you'll never have an unescaped `&` or `=` quietly add a second parameter.
Passing non-ASCII text in URLs
Email subjects, slugs with diacritics, or any UTF-8 string can ride in a URL if you percent-encode the bytes first.
Decoding captured URLs
When a tap or redirect gives you a `%`-heavy URL, decode the parameters to read what was actually sent — useful for debugging redirect chains and webhook URLs.
Sending form payloads in `application/x-www-form-urlencoded`
Both keys and values go through `encodeURIComponent` before joining with `=` and `&`, exactly as a browser serializes an HTML form submission.
Encoding modes
| Mode | What it escapes |
|---|---|
| URI Component | All reserved characters; suits one name or value |
| Full URI | Keeps ; / ? : @ & = # so a full URL still parses |
| Query String | Encodes each name and value separately, preserving & and = |
| URL Path | Encodes each slash-separated segment, leaving the slashes |
| Custom | Only the characters you type into the custom list |
Unicode input is converted to UTF-8 first, so é becomes %C3%A9.
Common mistakes
Mistake:Double encoding
Fix:A space was encoded twice: the % of %20 became %25. Decode once and inspect before re-encoding.
Mistake:Assuming + means space
Fix:This tool outputs %20 and leaves a literal + untouched; only HTML form encoding reads + as a space.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent escapes every reserved character, so it suits a single name or value. encodeURI leaves the reserved URL punctuation intact so a complete URL still parses. The tool exposes them as the URI Component and Full URI modes.
Why do I see %2520 in my URL?
A space encoded twice: %20 ran through an encoder again, turning its percent sign into %25. Decode once, confirm the text, and skip the extra pass next time.
Should spaces be + or %20?
In application/x-www-form-urlencoded bodies a + stands for a space, while ordinary URLs use %20. This tool produces %20, which every server accepts, and its decoder does not turn + back into a space.
Which characters never need encoding?
Letters, digits, hyphen, underscore, period and tilde. Anything carrying URL structure — ? & # / : and friends — must be escaped when it appears inside a value rather than as syntax.
Related guides
The Anatomy of a URL: Scheme, Host, Path, Query and Fragment
What each component in a URL does, how percent-encoding works, the difference between relative and absolute URLs, and why userinfo is a security concern.
URL Encoding Explained: A Practical Guide to Percent-Encoding
Why URLs can't contain spaces or special characters, how percent-encoding works, and how to avoid the classic pitfalls — double-encoding, + vs %20, and encodeURI vs encodeURIComponent.
Database Connection Strings, Demystified
The anatomy of PostgreSQL, MySQL, MongoDB, Redis and SQLite connection strings — and the URL-encoding gotcha that breaks them.
References & standards
Related tools
URL Parser
Break a URL into its components and decode query parameters
Base64 Toolbox
Professional Base64 workspace for text, files and images with Base64URL, MIME, Data URI, strict validation, image preview and ready-to-use snippets.
String Escape Utilities
Escape and unescape strings for HTML, JavaScript, JSON, SQL, URL, and other formats with batch processing
URL Redirect Chain Checker
Trace HTTP redirect hops — status codes, Location headers, and final URL