Salta al contenuto principale
Developer Tools 8 min read

URL Encoder & Decoder Online Free - Encode and Decode URLs Instantly (2026)

Encode special characters in URLs or decode percent-encoded strings instantly - essential for web developers.

Sejda Team

Sejda Editorial · Mar 29, 2026

What Is URL Encoding and Why Does It Exist?

URLs can only contain a specific set of characters defined by the URL specification (RFC 3986). Letters (A–Z, a–z), digits (0–9), and a handful of special characters (-, _, ., ~) are safe to use in URLs as-is. Everything else - spaces, non-ASCII characters, most punctuation, and special characters that have meaning in URL syntax like &, =, ?, # - must be encoded before they can appear in a URL.

URL encoding (also called percent-encoding) replaces unsafe characters with a percent sign followed by two hexadecimal digits representing the character's ASCII or UTF-8 byte value. A space becomes %20, an ampersand becomes %26, and a pound sign becomes %23. This encoding scheme allows URLs to carry any data safely without ambiguity. Sejda's free URL encoder and decoder handles both encoding and decoding instantly for any text input.

What the URL Encoder/Decoder Does

  • URL encoding (encoding mode) - Takes any text containing special characters and converts them to percent-encoded equivalents safe for use in URLs.
  • URL decoding (decoding mode) - Takes a percent-encoded URL or query string and converts all %XX sequences back to their original human-readable characters.
  • Full URL encoding - Encodes the entire URL including protocol, slashes, and domain - use when embedding a URL inside another URL as a parameter.
  • Query string encoding - Encodes only the parameter values in a query string, preserving the = and & structural characters - the most common use case for API work.
  • Batch encoding/decoding - Process multiple URLs or strings in one operation.
  • Character reference display - Shows the original character alongside its encoded form for learning and reference.

Step-by-Step: How to Encode and Decode URLs

  1. Open the tool - Go to /tools/url-encoder-decoder.
  2. Choose mode - Select Encode (text to percent-encoding) or Decode (percent-encoding to text).
  3. Paste your input - Enter the text or URL you want to process.
  4. Choose encoding scope - For encoding, select whether to encode the full URL (everything) or just the query parameter values (partial encoding).
  5. Click Encode/Decode - The result appears instantly in the output panel.
  6. Copy the result - Use the copy button to grab the encoded or decoded string.

Common Characters and Their URL Encodings

Here's a quick reference for the most frequently encountered URL-encoded characters:

  • Space → %20 (or + in form data)
  • ! → %21
  • # → %23
  • $ → %24
  • & → %26
  • ' → %27
  • ( → %28, ) → %29
  • * → %2A
  • + → %2B
  • , → %2C
  • / → %2F
  • : → %3A
  • ; → %3B
  • = → %3D
  • ? → %3F
  • @ → %40
  • [ → %5B, ] → %5D

Real-World Use Cases for URL Encoding

URL encoding appears in many practical situations that developers and non-developers encounter regularly:

  • Search engine query strings - When you search Google for "how to bake bread & butter pudding", the URL becomes ?q=how+to+bake+bread+%26+butter+pudding. The ampersand is encoded because it's a reserved character in query strings.
  • Social media sharing links - URLs passed as parameters to social sharing endpoints (like Twitter's tweet intent URL) must be encoded, otherwise the shared URL breaks when the social platform parses the parameter.
  • API query parameters - When passing filter values, search terms, or addresses as API query parameters, any special characters must be encoded. A filter like name=O'Brien must become name=O%27Brien to avoid the apostrophe breaking the query string parser.
  • Redirect URLs - When passing a redirect destination URL as a query parameter, the entire destination URL must be encoded: ?redirect=https%3A%2F%2Fexample.com%2Fpage.
  • Email links with subjects and bodies - Mailto links with pre-filled subjects and bodies require URL encoding: mailto:hello@example.com?subject=Hello%20World&body=I%20wanted%20to%20ask...
  • Form submission debugging - When diagnosing why a form POST isn't working correctly, decoding the URL-encoded form body helps you see exactly what data was submitted.

URL Encoding vs. HTML Encoding - An Important Distinction

URL encoding and HTML entity encoding are two different things that serve different purposes and are sometimes confused. URL encoding uses percent signs (%26 for &) and is used in URL query strings and path segments. HTML encoding uses ampersand-based entities (& for &) and is used in HTML content to represent characters that would otherwise be interpreted as HTML markup. In a URL that appears as an HTML attribute value, you may need both: the URL is percent-encoded, and if it's in an HTML attribute like href, the resulting string is also HTML-entity-encoded. Sejda's URL encoder handles only URL encoding - use a separate HTML encoder/decoder for HTML entity encoding.

The + vs. %20 Difference in Spaces

This is a subtle but practically important distinction. In the original URL specification, spaces in query strings could be represented as + signs (form encoding, also called application/x-www-form-urlencoded) or as %20 (standard percent encoding). The + shorthand only works in the query string part of a URL (after the ?) and in HTML form data. In URL path segments (before the ?), only %20 is valid - a + in a path segment is treated as a literal plus sign, not a space. Modern best practice is to use %20 everywhere for consistency and avoid the ambiguity of +. Sejda's encoder uses %20 for spaces by default.

Decoding Encoded URLs for Debugging

One of the most practical uses of a URL decoder is debugging. When you see a complex encoded URL in server logs, error reports, or API request parameters, decoding it instantly reveals what data was actually being passed. A URL like /search?q=%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86&lang=ja&filter=price%3A0-100 decodes to /search?q=ありがとう&lang=ja&filter=price:0-100 - revealing a Japanese search term and a price range filter that were invisible in the encoded form.

Common Mistakes to Avoid

  • Double-encoding URLs - If you encode a URL that's already encoded, %20 becomes %2520. This causes the receiving server to see %20 as literal text rather than a space. Always decode before re-encoding if you're unsure whether input is already encoded.
  • Encoding entire URLs when only parameters need encoding - If you encode the entire URL including slashes and colons, the URL structure breaks. Only encode the values in query parameters, not the structural characters of the URL itself.
  • Forgetting encoding in client-side JavaScript - Use encodeURIComponent() for individual parameter values and encodeURI() for full URL strings. Never concatenate user input into URLs without encoding it first.

Pro Tips

When building URLs programmatically, always use your language's built-in URL encoding functions (urllib.parse.quote() in Python, encodeURIComponent() in JavaScript, urlencode() in PHP) rather than manual string manipulation - they handle all edge cases correctly. Use Sejda's decoder when reading server access logs to understand what queries your users are actually making, especially if your analytics platform shows encoded query strings. And for internationalized URLs (containing non-ASCII characters like accents, Arabic, Chinese, or emoji), URL encoding ensures compatibility across all browsers and server configurations.

Conclusion

URL encoding is a foundational web standard that every developer encounters constantly in API work, link building, form handling, and debugging. Sejda's free URL encoder and decoder makes encoding and decoding any text instant and visual - paste your text, choose your encoding option, and get the result immediately. Whether you're preparing a complex query string for an API request, debugging an encoded URL in a log file, or building social sharing links, having a reliable URL encoder in your toolkit eliminates one of web development's most common sources of subtle bugs.

Related Free Tools

Related Articles

Try URL Encoder / Decoder - Free

Encode or decode any URL or query string instantly in your browser - with auto-detect, bulk mode, and live conversion.

Try it free