🛠️ Other ToolsFree · No signup

URL Encoder / Decoder

Encode special characters in URLs using percent-encoding (RFC 3986) or decode encoded URL strings. Essential for web development, API work, and link sharing.

About the URL Encoder / Decoder

A URL encoder and decoder converts special characters and non-ASCII text to and from percent-encoding — the standard format defined by RFC 3986 for safely including arbitrary characters in URLs. Percent-encoding replaces each byte of a character that is not in the "unreserved" set (A-Z, a-z, 0-9, -, _, ., ~) with a percent sign followed by the two-digit hexadecimal value of that byte. For example, a space becomes %20, & becomes %26, and the euro sign (€, UTF-8: E2 82 AC) becomes %E2%82%AC. This encoding is essential whenever user-provided text (names, search queries, addresses) is incorporated into a URL, because unencoded special characters can break URL parsing or create security vulnerabilities like parameter injection. Web frameworks and HTTP libraries handle encoding automatically in most cases, but developers still need to understand and manually decode or encode URLs when debugging, building custom queries, or parsing URLs outside of standard frameworks. This tool is used by web developers, backend engineers, SEO professionals, and API developers. In everyday life and specialty projects, having a fast, reliable calculator removes the guesswork and saves valuable time. From date calculations and time duration planning to construction estimating for tile, gravel, or roofing, these tools help you plan projects with accuracy. By verifying your needs in advance, you can avoid over-purchasing materials, stay within budget, and ensure your timelines are realistic. Furthermore, individual circumstances and local regulations can significantly impact the practical application of these figures. Users in the USA, Canada, the United Kingdom, Australia, and New Zealand often face different regional guidelines, tax brackets, or baseline measurements (such as USDA zones, CRA guidelines, HMRC allowances, or ATO schedules) that should be factored into any serious planning. By entering your specific parameters into this calculator, you can model multiple scenarios side by side to see how minor changes in inputs affect the overall outcome. This makes the tool an indispensable asset for regular monitoring and long-term goal setting, helping you adjust your strategies as your needs evolve over time. In addition, when incorporating this calculator into your regular planning and routines, it is highly recommended to document your results over a period of weeks or months. Keeping a structured log or digital archive of your calculations allows you to trace trends, identify patterns, and detect any sudden anomalies that may require adjustments. Whether you are managing electrical circuit loads, tracking personal health and fitness parameters, analyzing educational grade distributions, or balancing a household budget, consistent record-keeping turns one-off calculations into a powerful long-term strategy. Always verify that your input data is sourced from reliable references before drawing major conclusions, and consult with qualified experts when making decisions that impact your physical health, safety, or financial security.

Formula

Reserved chars: : / ? # [ ] @ ! $ & ' ( ) * + , ; = | Unreserved: A-Z a-z 0-9 - _ . ~ | All others: %XX (hex byte)

How It Works

JavaScript provides two encoding functions: encodeURI(url) preserves characters with special URL meaning (: / ? # [ ] @ ! $ & ' ( ) * + , ; =). Use for encoding a complete URL where structural characters must be preserved. encodeURIComponent(value) also encodes those structural characters — use for individual query parameter values. Example: encodeURIComponent("hello world&name=Bob") → "hello%20world%26name%3DBob". The full URL "https://example.com/search?q=hello world&filter=price>10" encoded correctly: only the values are encoded → "https://example.com/search?q=hello%20world&filter=price%3E10". Decoding: decodeURIComponent("%E2%82%AC") → "€". UTF-8 multi-byte characters: each byte is encoded separately — the euro sign (3 UTF-8 bytes) produces three percent-encoded triplets. To compute this value manually, follow these standard steps: 1. Identify all the required input variables (such as base values, rates, dimensions, or constants) and convert them to matching units. 2. Apply the primary mathematical formula or conversion factor designated for this specific calculation. 3. Perform the arithmetic operations step by step, ensuring you strictly follow the standard order of operations (PEMDAS/BODMAS). 4. Verify the result by running the calculation in reverse or checking against known reference tables. By following this structured methodology, you can verify your results and gain a deeper understanding of the relationships between the different variables involved in the calculation.

Tips & Best Practices

  • Always encode query parameter values individually before joining with & — do not encode the full query string after assembly. Encoding the entire string will encode the structural & and = characters, breaking the parameter parsing.
  • Double-encoding is a common bug: if a value is already percent-encoded and you encode it again, %20 becomes %2520 (the % is itself encoded as %25). Always decode first if you are uncertain whether a value is already encoded, then re-encode cleanly.
  • Path segments vs query parameters use slightly different encoding rules. In path segments, / must be encoded as %2F if it is data (not a path separator). In query strings, + traditionally represents a space (form encoding, RFC 1866) in addition to %20 — modern APIs prefer %20 for clarity.
  • For SEO purposes, URLs with readable words in the path (/categories/running-shoes/) rank better than URLs with encoded characters (/categories/running%20shoes/) or opaque identifiers. Use hyphens rather than spaces in URL paths; properly handle encoding only in query parameters where arbitrary user input is needed.

Who Uses This Calculator

Web and backend developers debugging URL encoding issues in API requests and query strings. SEO professionals analysing and correcting URL encoding in site audits. Frontend developers encoding user input for safe inclusion in dynamically constructed URLs. API integrators inspecting encoded webhook payloads, redirect URLs, and OAuth callback parameters. Common practical scenarios for this tool include: - Professional scenarios: Engineers, financial analysts, accountants, health practitioners, and educators use this calculation to verify data, draft official reports, and double-check manual calculations quickly. - Consumer and everyday scenarios: Homeowners, students, fitness enthusiasts, and travelers use the tool to make quick estimates on the go, budget for upcoming projects, and track personal goals. - Educational learning: Students and teachers use this tool as a step-by-step visual aid to understand mathematical formulas and verify homework answers.

Optimised for: USA · UK · Canada · Australia · Calculations run in your browser · No data stored

Frequently Asked Questions

Why do URLs need encoding?

URLs can only contain a limited set of ASCII characters. Special characters like spaces, &, =, ?, #, and non-ASCII characters must be percent-encoded as %XX (where XX is the hex code). For example, a space becomes %20, & becomes %26, and the euro symbol becomes %E2%82%AC.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a complete URL and preserves characters like /, :, ?, &, = that have meaning in URL structure. encodeURIComponent encodes a URL component (like a query parameter value) and also encodes these structural characters. Use encodeURIComponent for individual parameter values in query strings.

When should I URL encode data?

Always URL-encode query parameter values that might contain special characters, spaces, or non-ASCII text. When building API requests programmatically, use your language URL encoding functions (urllib.parse.quote in Python, encodeURIComponent in JavaScript). This prevents broken requests and potential security issues.