URL Encoder
Encode URLs and URL components safely for use in links, query parameters, APIs and web applications.
Encode URL
Enter your URL or text and choose an encoding mode.
Encoding Mode
Choose how special characters should be encoded.
Your data stays private
URL encoding happens entirely in your browser. Your URLs and text are not uploaded or stored on our servers.
What Is URL Encoding?
URL encoding converts characters that may have special meanings in URLs into a percent-encoded representation. For example, a space becomes %20.
hello world
hello%20world
hello@example.com
hello%40example.com
encodeURI vs encodeURIComponent
JavaScript provides two common URL encoding functions. The correct choice depends on what you are encoding.
encodeURI()
Best when encoding an entire URL. It preserves URL structure characters such as/, ? and &.
encodeURIComponent()
Best for individual URL components such as query parameter values, search terms and user-provided text.