URL Encoder / Decoder
Online URL encoder decoder — encodeURIComponent, encodeURI, form-urlencoded, URL analyzer, batch, 100% client
Options :
Texte à encoder
Caractères spéciaux fréquents
Encodage URL : tout ce que les développeurs doivent savoir
L'encodage URL (ou percent-encoding) est un mécanisme qui convertit les caractères non-ASCII ou les caractères réservés en une séquence de la forme %XX où XX est la valeur hexadécimale de l'octet UTF-8. C'est indispensable pour transmettre des données dans une URL sans les corrompre.
Quand encoder une URL ?
- Paramètres GET contenant des espaces, accents ou caractères spéciaux
- Chemins de fichiers avec espaces ou caractères non-ASCII
- Données dans des liens (href, src, action)
- API calls : valeurs de paramètres envoyées dans la query string
encodeURIComponent vs encodeURI
| Fonction | N'encode PAS | Usage typique |
|---|---|---|
encodeURIComponent() |
A-Z a-z 0-9 - _ . ! ~ * ' ( ) |
Valeurs de paramètres, slugs |
encodeURI() |
Tout ce qui précède + ; , / ? : @ & = + $ # |
URL complète (préserve la structure) |
form-urlencoded |
Idem component, mais espace → + |
Formulaires HTML, POST data |
Frequently asked questions
encodeURI encodes a complete URL while preserving its structure: characters : / ? = & # @ are not encoded because they are part of URL syntax. encodeURIComponen...
encodeURI encodes a complete URL while preserving its structure: characters : / ? = & # @ are not encoded because they are part of URL syntax. encodeURIComponent encodes everything except RFC 3986 unreserved characters, making it ideal for encoding parameter values. General rule: use encodeURIComponent for values, encodeURI for the entire URL.
%20 is the standard space encoding per RFC 3986. The + instead of space comes from the application/x-www-form-urlencoded format (used by HTML forms). Both are v...
%20 is the standard space encoding per RFC 3986. The + instead of space comes from the application/x-www-form-urlencoded format (used by HTML forms). Both are valid depending on context: %20 in URL paths, + in form query strings. Browsers accept both.
Simply click 'Reuse' after each decoding to use the result as new input and decode again. Or use Batch mode applying the processing multiple times. Common doubl...
Simply click 'Reuse' after each decoding to use the result as new input and decode again. Or use Batch mode applying the processing multiple times. Common double encoding: %2520 = % encoded twice (first % → %25, then %25 → %2525).
In JavaScript: encodeURIComponent(value). In PHP: urlencode($value) or rawurlencode($value). In Python: urllib.parse.quote(value) or urllib.parse.urlencode({'pa...
In JavaScript: encodeURIComponent(value). In PHP: urlencode($value) or rawurlencode($value). In Python: urllib.parse.quote(value) or urllib.parse.urlencode({'param': value}). In Java: URLEncoder.encode(value, 'UTF-8'). In Ruby: URI.encode_www_form_component(value).
No. Encoding and decoding is performed entirely in your browser via native JavaScript APIs (encodeURIComponent, decodeURIComponent, URL). No data is transmitted...
No. Encoding and decoding is performed entirely in your browser via native JavaScript APIs (encodeURIComponent, decodeURIComponent, URL). No data is transmitted to our servers. You can safely use this tool with URLs containing tokens or sensitive parameters.
Publicité
Tools in the same category
Popular tools
Trending tools