URL Encode and Decode – Safe URL and Query Handling

Encode and decode URLs, components, and query parameters with precision. Supports plus (+) spaces for form-style encoding, tolerant decoding, and quick query parsing.

Mode:
Use drag handle to resize
Character Count: 0Line Count: 0
Use drag handle to resize
Character Count: 0Line Count: 0

Tool Purpose & Audience

The URL Encode/Decode tool converts text to percent-encoded format safe for use in URLs, and decodes percent-encoded URLs back to readable text. Special characters like spaces, &, =, +, and non-ASCII letters must be encoded in URLs so they don't interfere with URL parsing or routing logic.

Developers, API integrators, QA engineers, and SEO specialists use this tool when building query strings, debugging broken URLs, constructing API endpoint parameters, testing URL parsing, and analysing redirects. It handles both standard URL encoding and form-style encoding (+ for spaces) with toggle support.

Real-World Use Cases

  • Building API query strings: Search queries, filter parameters, and user-input values must be URL-encoded before being appended to API endpoints — "hello world" becomes "hello%20world" or "hello+world".
  • Debugging broken URLs: A URL with special characters that renders incorrectly can be decoded to reveal exactly what characters are encoded and verify they match the intended values.
  • Constructing redirect parameters: OAuth, SSO, and redirect_uri parameters in authentication flows must be URL-encoded to survive transit through redirect chains without being misinterpreted.
  • SEO and analytics: Campaign tracking URLs with UTM parameters often contain special characters that need encoding — this tool encodes them correctly before they're attached to links in marketing materials.

Practical Input → Output Examples

1. Encoding a search query

Input: "hello world & more"

Output: "hello%20world%20%26%20more"

Spaces become %20, ampersands become %26 — the string is now safe to append as a URL parameter value.

2. Decoding a messy URL

Input: "https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello+world"

Output: "https://example.com/search?q=hello world"

Decoding makes the URL human-readable — useful when debugging encoded URLs from logs, redirects, or API responses.

3. Form-style encoding (+ for spaces)

Input: "name=John Smith&age=30"

Output (application/x-www-form-urlencoded): "name=John+Smith&age=30"

HTML form POST bodies use + instead of %20 for spaces. Toggle between URL encoding (%20) and form encoding (+) depending on the target system.

Common Mistakes & Misunderstandings

Encoding the entire URL vs encoding a component: If you encode an entire URL (e.g., "https://example.com/path?q=hello"), the colons, slashes, and question marks also get encoded — breaking the URL structure. Only encode the query parameter values, not the full URL.

%20 vs + for spaces: %20 is the standard RFC 3986 encoding for spaces in URLs. The plus sign (+) is the application/x-www-form-urlencoded convention for spaces in form data. They are interchangeable in query strings on most systems but not formally equivalent — some strict parsers treat them differently.

Double encoding: If you encode an already-encoded URL, "%20" becomes "%2520" (% becomes %25). This causes the receiving server to decode to "%20" instead of a space. Always check if your input is already encoded before encoding it again.

Safe characters don't need encoding: Letters (A–Z, a–z), digits (0–9), and the characters - _ . ~ are URL-safe and don't need encoding. Encoding them (as %41 for 'A') is valid but unnecessary and makes URLs harder to read.

What is URL encoding, and when should I use it?

URL encoding converts characters that are unsafe in URLs into percent-encoded sequences (like %20 for a space) so they can be transmitted reliably.

Use it when: - Adding query parameters (e.g., name=John Doe → name=John%20Doe). - Building URLs programmatically. - Ensuring data survives across redirects, forms, and API calls.

What is the difference between encodeURI and encodeURIComponent?

Use encodeURI for full URLs—it preserves reserved characters like /, :, ?, and & so the URL structure stays intact. Use encodeURIComponent for parts of a URL (like a query value) because it encodes almost all non-alphanumeric characters.

Examples: - encodeURI("https://site.com/a?b=c&d=e") → "https://site.com/a?b=c&d=e" - encodeURIComponent("a&b=c d") → "a%26b%3Dc%20d"

Why do some encoders use plus (+) for spaces?

In application/x-www-form-urlencoded (used by HTML forms), spaces are encoded as + instead of %20.

Examples: - Form-style: "hello world" → "hello+world" - Standard percent-encoding: "hello world" → "hello%20world"

This tool lets you use + when encoding and treats + as a space when tolerant decoding is enabled.

What is “tolerant decoding,” and when should I enable it?

Tolerant decoding helps when input contains mixed or partially encoded data. The tool first tries decodeURI (safer for full URLs) and falls back to decodeURIComponent if needed. It also handles + as a space.

Enable it if you are unsure how the text was encoded or you receive user-generated/legacy URLs. Disable it when you need strict validation.

How do I parse query parameters from a URL?

Choose “Parse Query Parameters,” then paste a full URL or a raw query string. The tool extracts keys and values and shows them line by line.

Example: https://example.com/?a=1&b=two%20words →

a=1

b=two words

Copyright ©2006-2025 Caseconvert.ing AHM Core Ltd|Last Updated (Aug 2025)|Concept byAbdulhaq Mansoor|Privacy Policy|Terms of Service|Sponsorship|Site Map|Theme:
Registered in England and Wales. Company number: Coming Soon.
Registered office address: Coming Soon | Example ( C4DI @TheDock, 41-28 Queen Street, England, HU1 1UU )