Cette page n’est pas encore traduite en français : elle s’affiche en anglais.

URL Encoder & Decoder

Percent-encode text for safe use in URLs, decode encoded strings back to readable text, and break any URL down into its parts and query parameters.

Mis à jour le

URL parser

Vos données ne quittent jamais votre ordinateur. Tout le traitement se fait localement dans votre navigateur.

Comment utiliser : URL Encode / Decode

  1. Pick a mode: Encode component for a single query value or path segment, Encode full URL for a complete address, or Decode.
  2. Type or paste into the left box; the result updates as you type.
  3. Use Spaces as + for HTML-form style encoding, or Each line separately to process a list.
  4. Paste any URL into the URL parser to see its host, path, and a decoded table of query parameters.

What is URL encoding?

URL encoding, formally percent-encoding (RFC 3986), replaces characters that are not allowed or have a special meaning in a URL with a % followed by two hexadecimal digits. A space becomes %20, & becomes %26, and non-ASCII characters are first converted to UTF-8 bytes and then encoded byte by byte: é → %C3%A9, € → %E2%82%AC. Without encoding, a value like Tom & Jerry in a query string would be split into two parameters.

encodeURIComponent vs. encodeURI

JavaScript offers two functions, and picking the wrong one is a classic bug:

CharacterencodeURIComponentencodeURI
Space%20%20
/ ? # & = : @ + , ; $EncodedKept as is
A–Z a–z 0–9 - _ . ! ~ * ' ( )KeptKept
é, emoji, other non-ASCIIUTF-8 percent-encodedUTF-8 percent-encoded

Use encodeURIComponent (“Encode component”) for anything you insert into a URL — a query parameter value, a path segment, a redirect URL passed as a parameter. Use encodeURI (“Encode full URL”) only on a complete URL that just contains spaces or non-ASCII characters, because it leaves the structural characters : / ? # & intact.

%20 or +?

In the path of a URL a space must be %20. In query strings submitted by HTML forms (application/x-www-form-urlencoded) spaces are written as +. Most servers accept both in the query string, but a literal plus sign must then be sent as %2B. The decoder treats + as a space by default; untick the option if your data contains real plus signs.

Decoding errors

A % must be followed by exactly two hex digits, and multi-byte UTF-8 characters need all their bytes. Plain decodeURIComponent() throws URIError: malformed URI sequence on the first bad sequence; this tool decodes everything that is valid, leaves malformed parts untouched and tells you which ones they are. Double-encoded strings (%2520) show up as %20 after one pass — decode again to get the space.

Anatomy of a URL

https://user@shop.example.com:8443/search?q=shoes#results consists of the scheme (https:), optional credentials, host, port, path, query string and fragment. The parser above uses the browser's standard URL API (WHATWG URL Standard), the same one used by fetch(). Building campaign links? Try the UTM Builder. Need to encode binary data instead? Use Base64.

Aussi recherché comme : percent encoding, urlencode, urldecode, encodeuricomponent, query string decoder, url parser, url escape.

Outils complémentaires : URL Encode / Decode

  • HTML Entity Encoder — Escape < > & " so text is safe to show in HTML, convert accents and symbols to named or numeric entities, or decode entity-filled HTML back to plain text.
  • Slug Generator — Convert any title into a clean, lowercase URL slug — with proper transliteration of accents, umlauts and Cyrillic, optional stop-word removal and a bulk mode for whole lists.
  • Décodeur JWT — Collez un JSON Web Token pour examiner son en-tête et sa charge utile, vérifier sa date d'expiration et valider sa signature.
  • Traducteur de code Morse — Saisissez du texte pour obtenir le code Morse, ou collez des points et des tirets pour les décoder — puis écoutez le résultat, observez les clignotements et téléchargez le fichier audio.

Questions fréquentes

When should I use encodeURIComponent instead of encodeURI?
Use encodeURIComponent for individual pieces you put into a URL — query values, path segments, or a whole URL passed as a parameter. Use encodeURI only for a complete URL, since it keeps / ? & # = unencoded.
Why is a space sometimes %20 and sometimes +?
%20 is the RFC 3986 encoding valid everywhere in a URL. + means space only in form-encoded query strings (application/x-www-form-urlencoded), which is what HTML forms send.
What does “URIError: malformed URI sequence” mean?
The string contains a % not followed by two hex digits, or an incomplete UTF-8 byte sequence. This decoder leaves those parts unchanged and lists them, instead of failing.
Which characters never need encoding?
The unreserved characters: letters A–Z a–z, digits 0–9 and - _ . ~. Everything else is either reserved for URL syntax or must be percent-encoded.
Puis-je installer URL Encode / Decode en tant qu’application web et l’utiliser hors ligne ?
Oui. URL Encode / Decode est une application web installable (PWA) : elle s’installe depuis votre navigateur, sans passer par une boutique d’applications. Cliquez sur « Installer l’application » en haut de cette page dans Chrome ou Edge (Windows, macOS, Linux, ChromeOS) ; sur Android, utilisez « Partager » → « Ajouter à l’écran d’accueil » sur iPhone et iPad ; ou « Fichier » → « Ajouter au Dock » dans Safari 17+ sur Mac. L’application s’ouvre alors dans sa propre fenêtre avec sa propre icône, et comme elle s’exécute entièrement dans votre navigateur, elle continue de fonctionner hors ligne. Firefox sur ordinateur de bureau ne permet pas d’installer d’applications web. Comment fonctionne l’installation.

Outils similaires