Passer au contenu principal

Encodeur URL

URLs can only contain a limited set of ASCII characters. Special characters (spaces, accents, &, =, ?) must be percent-encoded (%20, %26, %3D) to be safely transmitted in URLs. Our tool encodes and decodes URLs and individual URL components (query parameters), handles both application/x-www-form-urlencoded and RFC 3986 encoding standards.

Entrée

Sortie

Encodage URL

URL encoding (percent encoding) converts special characters into a format safe for URLs. Each special character is replaced with a % followed by its hexadecimal ASCII code.

Caractères encodés courants :

  • Space → %20
  • ! → %21
  • # → %23
  • & → %26
  • = → %3D
Partager cet outil
Developer Tools

À propos de URL Encoder / Decoder

URLs can only contain a limited set of ASCII characters. Special characters (spaces, accents, &, =, ?) must be percent-encoded (%20, %26, %3D) to be safely transmitted in URLs. Our tool encodes and decodes URLs and individual URL components (query parameters), handles both application/x-www-form-urlencoded and RFC 3986 encoding standards.

Comment l'utiliser

  1. Paste a URL or text string to encode it for safe use in a URL.
  2. Paste a percent-encoded URL or string to decode it to readable text.
  3. Use component mode to encode only the query string value, not the full URL structure.
  4. Toggle between full URL encoding and query parameter value encoding.

Formule et méthodologie

RFC 3986: encode everything except unreserved chars (A–Z a–z 0–9 - _ . ~). Each byte → %XX (uppercase hex). Space = %20. & = %26. = = %3D. JavaScript: encodeURIComponent() for query values; encodeURI() for full URLs (leaves : / ? # & = intact). PHP: urlencode() (spaces → +) vs rawurlencode() (spaces → %20).

Cas d'usage courants

  • Building API request URLs with special characters in query parameters
  • Debugging: decoding an obfuscated or double-encoded URL in logs
  • Form handling: understanding how browsers encode form data
  • OAuth/SAML: redirect URIs and state parameters must be encoded
  • Web scraping: handling international URLs with non-ASCII characters

Questions fréquentes

encodeURI() encodes a complete URL — it leaves characters that are valid URL structure intact (: / ? # [ ] @ ! $ & ' ( ) * + , ; =). encodeURIComponent() encodes a URL component — it encodes all those characters too, making it safe for use as a query parameter value. Use encodeURIComponent() for values; encodeURI() for full URLs. Mixing them up is a common source of broken URLs.
Two different encoding standards. application/x-www-form-urlencoded (HTML form submission): spaces become +. RFC 3986 (URL path encoding): spaces become %20. Query strings in form submissions often use + for spaces; modern APIs and URL builders use %20. Both are technically valid in query strings. When in doubt, use %20 — it's unambiguous and works everywhere.

Outils connexes

Tous les outils →

Intégrer cet outil sur votre site

Gratuit pour usage personnel et commercial. Copiez simplement le code ci-dessous.