FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
URL Encoding Complete Guide: Why %20 Exists and How to Handle It
How-ToWeb Development

URL Encoding Complete Guide: Why %20 Exists and How to Handle It

via Dev.to Webdevarenasbob2024-cell1mo ago

Every web developer encounters URL encoding. But why does a space become %20? Here is the complete guide. What Is URL Encoding? URLs can only use a limited set of ASCII characters. URL encoding converts unsafe characters to %XX format. Space -> %20 / -> %2F ? -> %3F & -> %26 = -> %3D JavaScript // For values in query params encodeURIComponent ( ' hello world & goodbye ' ) // 'hello%20world%20%26%20goodbye' // For full URLs (preserves :, /, ?, &) encodeURI ( ' https://example.com/path?q=hello world ' ) Rule : Use encodeURIComponent for values, encodeURI for full URLs. Python from urllib.parse import quote , quote_plus quote ( ' hello world ' ) # 'hello%20world' quote_plus ( ' hello world ' ) # 'hello+world' The Double Encoding Trap Original: hello world Encoded once: hello%20world Encoded twice: hello%2520world <- BUG! If you see %25 in URLs, you are double-encoding. Try It Online Encode and decode URLs with DevToolBox URL Encoder - handles all special characters. Have you been burned b

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
25 views

Related Articles

How-To

The Difference between `let`, `var` and `const`

Medium Programming • 2d ago

How-To

Circulation Metrics Framework for Living Systems

Medium Programming • 2d ago

Red Rooms makes online poker as thrilling as its serial killer
How-To

Red Rooms makes online poker as thrilling as its serial killer

The Verge • 2d ago

Don’t Know What Project to Build? Here Are Developer Projects That Actually Make You Better
How-To

Don’t Know What Project to Build? Here Are Developer Projects That Actually Make You Better

Medium Programming • 2d ago

Why Most Developers
Stay Broke
How-To

Why Most Developers Stay Broke

Medium Programming • 2d ago

Discover More Articles