Originally published on DevToolsHub — free, privacy-first online tools for developers.

Every developer has seen it: %20, %3A, %2F — URL encoding is everywhere. Whether you're building REST APIs, handling form submissions, parsing query strings, or debugging OAuth redirects, understanding URL encoding is essential.

What is URL Encoding?

URL encoding (also called percent-encoding) converts special characters into a format that can be safely transmitted in URLs. Only a limited set of characters are allowed unescaped in URLs: alphanumeric characters (A-Z, a-z, 0-9) and a few special characters like -, _, ., ~.

Everything else gets encoded as a % followed by two hexadecimal digits representing the character's UTF-8 byte value.