What is URL Encoder / Decoder?
Free URL encoder and decoder. Encode special characters for safe use in URLs, query strings, or HTML. Decode percent-encoded URLs instantly. Supports encodeURIComponent, encodeURI, and Base64. No signup.
URL Encoder runs entirely in your browser using JavaScript (browser). Your data never leaves your device.
Free URL Encoder / Decoder
Encode and decode URLs in three modes: encodeURIComponent (encodes everything except unreserved characters — best for query string values), encodeURI (preserves the full URL structure), and Base64 (for embedding binary or non-ASCII data). Instantly see encoded and decoded output side-by-side with copy buttons. Handles Unicode, special characters, and long strings. 100% browser-based.
encodeURIComponent encodes all characters except: A–Z a–z 0–9 - _ . ! ~ * ' ( ) — use this for individual query parameter values.
Frequently Asked Questions
You might also like
Browse all 17 Developer Tools tools →Base64 Encoder / Decoder
Encode and decode Base64 text and files instantly
JSON Formatter
Format, validate, and minify JSON instantly
UUID Generator
Generate UUIDs v1, v4 & v7 instantly in your browser
URL Encoding in Web Development
URL encoding (officially called percent-encoding) is required whenever a URL must carry characters that are either reserved (having special meaning in URL syntax) or that are not safe to transmit in the ASCII range. The HTTP specification mandates that URLs contain only a subset of ASCII characters — spaces, Unicode characters, and symbols like <, >, #, and % must be encoded before being sent in a request.
encodeURIComponent vs encodeURI
JavaScript provides two built-in encoding functions with an important distinction. encodeURIComponent encodes every character except unreserved characters (letters, digits, - _ . ! ~ * ' ( )). This makes it ideal for encoding a single query string value where characters like &, =, +, and / would otherwise break the URL structure. encodeURI leaves URL-structural characters intact (/ : ? & = + $ # ; , @) and is intended for encoding a complete URL when you want to preserve its structure while only escaping unsafe characters.
When to Use Each Mode
Use encodeURIComponent when building query strings: ?q=hello+world&lang=en should be constructed as ?q=encodeURIComponent("hello world")&lang=encodeURIComponent("en"). Use encodeURI when you have a complete URL with a path and query string that already uses correct URL syntax and you just need to escape unsafe Unicode characters. Use Base64 when you need to embed binary data or non-ASCII text in a URL-safe way, such as in a data URI or a JWT.