100% FREE ยท NO SIGNUP

URL Encoder / Decoder

Encode or decode URLs, query strings, and special characters. Parse full URLs into components. All in your browser.

Encoding Mode

0
0

Common URL Encoding Reference

CharacterEncodedDescription
space%20Space character
!%21Exclamation mark
#%23Hash / fragment
$%24Dollar sign
&%26Ampersand
+%2BPlus sign
/%2FForward slash
:%3AColon
=%3DEquals sign
?%3FQuestion mark
@%40At sign

๐Ÿš€ More Free Dev Tools

Base64 Encoder, Hash Generator, JSON Formatter, JWT Decoder, and 20+ more tools.

Browse All Tools โ†’

Free URL Encoder / Decoder Tool

URL encoding (also called percent-encoding) converts special characters into a format that can be transmitted over the internet. This tool lets you encode or decode URLs and query parameters instantly.

encodeURIComponent vs encodeURI

JavaScript provides two functions for URL encoding, and they behave differently:

When to Use URL Encoding

Code Examples

// JavaScript
const encoded = encodeURIComponent("hello world & more");
// โ†’ "hello%20world%20%26%20more"

const decoded = decodeURIComponent("hello%20world");
// โ†’ "hello world"

// Python
from urllib.parse import quote, unquote
encoded = quote("hello world & more")
decoded = unquote("hello%20world")

// PHP
$encoded = urlencode("hello world & more");
$decoded = urldecode("hello%20world");

Frequently Asked Questions

What is URL encoding and why is it needed?

URL encoding (percent encoding) converts special characters into a format safe for URLs. Characters like spaces, &, =, and # have special meanings in URLs, so they must be encoded as percent sequences โ€” space becomes %20, & becomes %26. Without encoding, URLs can break or send incorrect data. It is required for query strings, form submissions, and API parameters.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a complete URL but leaves characters like /, ?, #, and & unencoded because they are valid URL structure characters. encodeURIComponent encodes everything including those characters, making it ideal for encoding individual query parameter values. Use encodeURIComponent when encoding a value that will be placed inside a query string parameter.

How do I decode a percent-encoded URL?

To decode a percent-encoded URL, paste it into the input field and click Decode. The tool converts sequences like %20 back to spaces, %3A to colons, and %2F to slashes. This reveals the original, human-readable URL or query string. Decoding is essential when debugging API calls, reading server log files, or understanding complex redirect chains.

Which characters must be encoded in a URL?

Characters that must be encoded include spaces (%20), # (%23), % (%25), & (%26), + (%2B), = (%3D), ? (%3F), and non-ASCII characters. Reserved characters like /, ?, #, and & must be encoded when used as data values inside query strings. Letters (A-Z, a-z), digits (0-9), and - _ . ~ are always safe and never need encoding.

Can I use this tool to parse a full URL into its components?

Yes. Switch to URL Parse mode to break a full URL into its protocol, host, path, query string, and fragment components. The tool also displays individual query parameters in a table, making it easy to inspect API endpoints, debug redirect URLs, or understand complex query strings. All processing is 100% client-side โ€” your URLs never leave your browser.

Need AI-Powered Dev Tools?

Explore the MatrixClawAI API โ€” automate your workflow with AI agents.

Explore API โ†’

Related Tools