URL Encoding Blog

Tips, guides, and best practices for URL encoding and web development.

Guide12 min read

The Complete Guide to URL Encoding

Learn everything about URL encoding: what it is, why it matters, how percent-encoding works, and best practices for handling special characters in URLs across different programming languages.

Read more →
Reference6 min read

URL Encoding vs Base64 Encoding: What's the Difference?

URL encoding (percent-encoding) converts special characters in URLs to %XX format per RFC 3986. Base64 encoding converts binary data to a text string using 64 ASCII characters per RFC 4648. They serve different purposes and are not interchangeable.

Read more →
Guide8 min read

What is Percent Encoding? (RFC 3986 Explained Simply)

Percent encoding is a mechanism defined in RFC 3986 for encoding special characters in URIs by replacing them with a percent sign (%) followed by two hexadecimal digits. It ensures URLs contain only valid ASCII characters that can be transmitted safely over the internet.

Read more →
FAQ5 min read

URL Encoding Spaces: %20 vs + (When to Use Which)

%20 is the standard RFC 3986 percent-encoding for a space character and should be used in URL paths and most contexts. The + sign represents a space only in application/x-www-form-urlencoded format, used in HTML form submissions and some query strings.

Read more →
JavaScript7 min read

How to Decode a URL in JavaScript (Complete Guide)

JavaScript provides decodeURIComponent() to decode individual URI components and decodeURI() to decode complete URIs. Use try-catch to handle malformed URIs. The URL and URLSearchParams APIs provide safer alternatives for parsing URLs.

Read more →
API8 min read

How to Properly Encode Query Parameters in REST APIs

REST API query parameters must be percent-encoded per RFC 3986 to safely include special characters like &, =, spaces, and Unicode. Use encodeURIComponent() in JavaScript, urllib.parse.quote() in Python, or URLEncoder.encode() in Java.

Read more →
Reference6 min read

HTML Entity Encoding vs URL Encoding: Key Differences

HTML entity encoding converts characters like <, >, &, and " to HTML entities (&lt;, &gt;, &amp;, &quot;) for safe display in web pages. URL encoding converts characters to %XX format for safe transmission in URLs. They protect against different types of attacks and are used in different contexts.

Read more →
Debugging6 min read

How to Fix ERR_INVALID_URL in Node.js

The ERR_INVALID_URL error in Node.js occurs when the URL constructor or url.parse() receives a string that is not a valid URL. Common causes include missing protocol, unencoded special characters, and malformed percent-encoding. Fix it by validating input and encoding special characters before parsing.

Read more →

Try Our Free Tools