Skip to main contentSkip to secondary navigation
HomeengineeringURL Encode

URL Encoder / Decoder

Encode text for safe URL transmission or decode URL-encoded strings. Shows character mappings for special characters.

✓ Formula verified: January 2026

URL Encode

Results update instantly as you type

Enter Values

The Formula

URL Encoding = % + hex code (e.g., space → %20)

URL encoding (percent-encoding) converts characters into a format that can be safely transmitted in URLs by replacing unsafe characters with % followed by their two-digit hex code. Every character has an ASCII code, and percent-encoding simply writes that code in hexadecimal preceded by a percent sign. For example, the space character has ASCII code 32 decimal, which is 20 in hex, so it encodes as %20. This scheme ensures that URLs remain unambiguous and compatible across all web servers, proxies, and browsers, regardless of the underlying character encoding of the page.

Variable Definitions

input

Input Text

The text to URL-encode or the percent-encoded string to decode.

encoded

Encoded Output

Percent-encoded string safe for use in URLs.

How to Use This Calculator

  1. 1

    Select Encode mode to convert special characters to percent-encoding for use in URL query parameters or path segments.

  2. 2

    Select Decode mode to convert percent-encoded strings back to plain readable text, for example when debugging encoded URLs.

  3. 3

    The encoding map shows which characters in your input were encoded and what their hex codes are.

  4. 4

    Character counts show how encoding affects the length — strings with many special characters can grow significantly.

URL encoding replaces unsafe characters with % followed by their two-digit hex code for safe URL transmission.

Understanding the Concept

URL encoding (percent-encoding) replaces unsafe ASCII characters in URLs with a % followed by their two-digit hexadecimal code. For example, a space becomes %20, an ampersand (&) becomes %26, and a hash (#) becomes %23. Only alphanumeric characters (A-Z, a-z, 0-9) and the unreserved characters (- _ . ~) remain unencoded. Reserved characters like ?, /, :, @, &, =, +, $, and # must be encoded when they appear in data rather than as URL syntax delimiters. Without percent-encoding, special characters in query parameters would break URL parsing: if a search query contains "&", the server would misinterpret it as a parameter separator, so encoding it as %26 solves this problem. Modern browsers automatically encode certain characters in the address bar, but when constructing URLs programmatically in JavaScript, encodeURIComponent() encodes query parameter values safely while encodeURI() preserves structural characters like slashes.

Frequently Asked Questions

Related Calculators

Reviews

No reviews yet. Be the first to share your experience with URL Encoder / Decoder.

Write a Review

Your Rating *

0/1000

0/50

Related Calculators

Medical Disclaimer: The health and fitness calculators on this site are for informational and educational purposes only. They are not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider with any questions about your health.

Financial Disclaimer: The finance calculators on this site are for informational purposes only and do not constitute financial advice. Results are estimates based on the inputs provided and may vary. Consult a qualified financial advisor before making investment or financial decisions.

© 2026 TheCalcUniverse. All results are for informational purposes only.

Fast, free, and privacy-first.