URL Encoder/Decoder
Codifica e decodifica URL con supporto per encodeURI, encodeURIComponent. URL parser e query string builder inclusi.
Converti
Come utilizzare URL Encoder/Decoder
Scegli la modalità
Seleziona "Encode" per codificare un testo in formato URL-safe oppure "Decode" per decodificare una stringa già codificata. Lo strumento rileva automaticamente la modalità più adatta all'input.
Seleziona il metodo di codifica
Scegli tra "encodeURIComponent" (consigliato, codifica tutto tranne lettere, cifre e -_.!~*'()), "encodeURI" (preserva i caratteri URL strutturali come /, ?, &) e "escape" (obsoleto, da evitare).
Inserisci il testo
Digita o incolla il testo da codificare oppure l'URL da decodificare nell'area di testo. Un banner ti avviserà se viene rilevato un double encoding.
Avvia la conversione
Premi "Codifica" o "Decodifica" per elaborare l'input. Il risultato apparirà nell'area di output. Usa il pulsante "Scambia" per invertire l'operazione.
Usa l'URL Parser o il Query Builder
Nella barra laterale puoi incollare un URL completo per analizzarne i componenti (protocollo, host, path, parametri), oppure costruire una query string partendo dai singoli parametri chiave-valore.
Suggerimenti
- Per codificare valori di parametri query (es. email, nomi con spazi), usa sempre encodeURIComponent, mai encodeURI.
- Il Query String Builder nella barra laterale gestisce automaticamente l'encoding dei parametri: inserisci i valori in chiaro e lui produrrà la stringa corretta.
- Se ricevi un URL da un'email o da un log di sistema e sembra strano, incollalo nella casella di input in modalità Decode per leggerne il contenuto originale.
Domande frequenti
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent encodes almost all special characters, including /, ?, &, = and #, and is ideal for encoding query parameter values. encodeURI instead preserves the characters that are part of a URL's structure (such as /, ?, &, #) and is designed to encode entire URLs without altering their structure.
When should I use URL Encoder?
Use this tool when you need to pass special data such as URL parameters (e.g. strings with spaces, accents, non-ASCII characters), when building REST API query strings, or when you need to decode URL encoded data received from a server or access logs.
How do I build a query string with multiple parameters?
Use the "Query String Builder" in the sidebar: add key-value pairs by clicking the "Add Parameter" button. The tool will automatically generate the correctly encoded query string, e.g., ?name=Mario+Rossi&email=mario@example.com.
What is double encoding and how is it resolved?
Double encoding occurs when a pre-encoded string is encoded again, producing sequences like %2520 instead of %20. The tool automatically detects this condition and offers a "Decode Completely" button to remove all levels of encoding in a single operation.
How can I analyze complex URL parameters?
Attach the full URL to the "URL Parser" field in the sidebar. The tool will automatically break it down into its components: protocol, host, port, path, query string and hash, listing each parameter with key and value separated.