Codificador y Decodificador de URL

Codifica o decodifica fácilmente cadenas y componentes de URL. Nuestra herramienta utiliza encodeURIComponent para un procesamiento seguro basado en el navegador. Perfecto para desarrolladores que trabajan con cadenas de consulta y caracteres especiales.

Publicidad
Publicidad

A URL encoder/decoder converts text between plain text and URL-safe format. URL encoding (also called percent encoding) replaces special characters like spaces, ampersands, and non-ASCII characters with percent-prefixed hex codes (e.g., space becomes %20). This ensures URLs work correctly in browsers and APIs. Decoding reverses this process. This tool handles both operations instantly in your browser.

Codifica y decodifica URLs sin enviar datos a ningún sitio

Usa `encodeURIComponent` para máxima seguridad. Procesa cadenas de consulta, segmentos de ruta y caracteres especiales — todo localmente en tu navegador. Sin subidas.

100% client-side
Resultados instantáneos
Gratis ilimitado

Como usarlo

  1. 1

    Pega Tu Cadena

    Introduce el texto o la URL completa que quieres procesar en el campo 'Cadena de Entrada'.

  2. 2

    Elige una Acción

    Haz clic en el botón 'Codificar' para convertir los caracteres especiales a su formato codificado por porcentaje, o haz clic en 'Decodificar' para revertirlos a su forma original.

  3. 3

    Copia el Resultado

    La cadena procesada aparecerá en el campo 'Salida'. Haz clic en el botón 'Copiar Resultado' para guardarla en tu portapapeles.

¿Por Qué es Necesaria la Codificación de URL?

Solo Caracteres ASCII

Las URLs solo pueden contener un conjunto específico de caracteres del conjunto ASCII. Cualquier carácter fuera de este conjunto debe ser codificado.

Caracteres Reservados

Los caracteres que tienen un significado especial en las URLs (como `&` o `?`) deben ser codificados para evitar ser malinterpretados por el servidor.

Integridad de los Datos

La codificación asegura que los parámetros pasados en la URL (p. ej., consultas de búsqueda) se interpreten correctamente como datos, y no como parte de la estructura de la URL.

Publicidad

Understanding URL Encoding

What is URL encoding and why is it needed?

URLs were originally designed to transmit ASCII text over the internet. The URL specification (RFC 3986) reserves certain characters for special purposes: '?' separates the path from the query string, '&' separates parameters, '=' separates keys from values, '#' marks a fragment, and '/' separates path segments. When these characters appear in the data portion of a URL (like a search query or a parameter value), they must be encoded to avoid being interpreted as structural delimiters.

URL encoding (percent encoding) replaces each reserved or non-ASCII character with a percent sign (%) followed by two hexadecimal digits representing the character's byte value. For example, a space becomes %20, an ampersand becomes %26, and a forward slash becomes %2F. Characters in the unreserved set (A-Z, a-z, 0-9, hyphen, underscore, period, tilde) are never encoded. The JavaScript function encodeURIComponent() handles this encoding, while decodeURIComponent() reverses it.

Modern URLs also need to handle Unicode characters (emoji, CJK characters, accented letters). These are first encoded as UTF-8 bytes, then each byte is percent-encoded. For example, the coffee emoji 鈽?(U+2615) is encoded as UTF-8 bytes E2 98 95, which becomes %E2%98%95 in a URL. The browser and server automatically handle this encoding when you type a URL or submit a form, but developers often need to manually encode or decode URLs when building API endpoints, redirect URLs, or data URIs.

Publicidad

Common use cases for URL encoding

URL encoding is essential when passing data through URLs in web applications. Common scenarios include: building API query parameters (encoding search terms, filter values), creating redirect URLs that contain the original URL as a parameter (e.g., /login?redirect=%2Fdashboard), generating data URIs for embedded images or fonts, and encoding email links with subject and body parameters (mailto:?subject=...&body=...). OAuth flows also heavily rely on URL encoding for state parameters and callback URLs.

Un error común es la doble codificación — codificar una cadena ya codificada. Por ejemplo, codificar '%20' produciría '%2520' (el signo de porcentaje en sí se codifica a %25). Descodifica siempre antes de volver a codificar si no estás seguro del estado actual de la cadena. Otro problema común es usar encodeURI() en lugar de encodeURIComponent() — encodeURI() no codifica caracteres reservados como ?, & y =. Usa encodeURIComponent() para valores de parámetros individuales y encodeURI() solo para URLs completas.

Publicidad

How does this compare to other URL encoders?

A side-by-side comparison of popular URL encoding tools.

CaracterísticaNovaToolsURL-Encoder.ioMeyerWeb
Codificar + Decodificar en una herramientaSÍ Ambos modosSolo codificar
Conversión en vivo al escribirInstantáneoBotón enviar
Maneja Unicode/emojiSÍ UTF-8Limitado
Privacidad (sin subida)100% localDel lado del servidor
Copiar con un clic
Funciona sin conexiónSÍ (página estática)

Nuestra herramienta realiza toda la codificación y descodificación en tu navegador — tu texto nunca se envía a un servidor, lo que la hace segura para URLs que contienen parámetros sensibles como tokens o IDs de sesión.

Preguntas frecuentes

¿Qué es la Codificación de URL?
La codificación de URL, también conocida como codificación por porcentaje, es un mecanismo para convertir caracteres que tienen un significado especial en las URLs (como espacios, '&', '?', '#') en un formato seguro que se puede transmitir por Internet. Cada carácter especial se reemplaza por un signo '%' seguido de su código hexadecimal de dos dígitos.
¿Mis datos se envían a un servidor?
No. Esta herramienta funciona completamente dentro de tu navegador web. Tus datos nunca se suben ni se almacenan en ningún servidor, garantizando un 100% de privacidad y seguridad.
¿Cuál es la diferencia entre encodeURI() y encodeURIComponent()?
Esta herramienta utiliza `encodeURIComponent()`, que generalmente es más seguro y completo. Codifica caracteres reservados que son esenciales para la estructura de la URL (como `/`, `?`, `&`, `#`) para asegurar que se traten como texto literal, mientras que `encodeURI()` los preserva.
When should I use URL encoding?
URL encoding is necessary whenever you include data in a URL that contains characters outside the ASCII character set or characters that have special meaning in URL syntax. Common scenarios include: encoding search query parameters (e.g., `?q=hello world` → `?q=hello%20world`), encoding email addresses or usernames in URLs, passing JSON or base64 data in query strings, encoding international characters (UTF-8), and building redirect URLs with nested parameters. If you are building URLs programmatically in JavaScript, always use `encodeURIComponent()` on dynamic values.
¿Qué caracteres necesitan ser codificados?
Characters that must be encoded include: reserved characters with special meaning in URLs (`;`, `,`, `/`, `?`, `:`, `@`, `&`, `=`, `+`, `$`, `#`), unsafe characters that could be misinterpreted (`<`, `>`, `"`, `{`, `}`, `|`, ```, `^`, `~`, `[`, `]`), and non-ASCII characters (any character outside the basic ASCII range 0-127). Spaces are always encoded as `%20` (not `+`, which is a common misconception — `+` is only used for spaces in `application/x-www-form-urlencoded` data, not in URLs). The percent sign itself (`%`) must be encoded as `%25`.
¿Puede esta herramienta manejar Unicode y caracteres internacionales?
Yes. The tool uses `encodeURIComponent()`, which properly encodes Unicode characters using UTF-8 percent-encoding. For example, the Chinese character `你` is encoded as `%E4%BD%A0` (three bytes in UTF-8), and the emoji `🎉` is encoded as `%F0%9F%8E%89` (four bytes). This ensures that international text, emoji, and other non-ASCII characters are correctly transmitted in URLs. When decoding, the tool uses `decodeURIComponent()`, which converts the percent-encoded bytes back to the original UTF-8 characters.
Why does my decoded URL look different from the original?
This can happen for several reasons. First, `+` characters in the input are not converted to spaces by `decodeURIComponent()` — they remain as literal `+` signs. If you need to decode form-encoded data where `+` represents a space, use `decodeURIComponent(input.replace(/`+/g, '%20'))` instead. Second, if the original URL was encoded with a different character set (e.g., Latin-1 instead of UTF-8), the decoded characters may appear garbled. Third, double-encoding (encoding an already-encoded string) will produce `%2520` instead of `%20` — always decode first, then re-encode if needed.
Does this tool work with Base64 encoding?
This tool focuses on URL encoding, not Base64 encoding. However, the two are often used together: you Base64-encode binary data (like images or tokens), then URL-encode the result to safely include it in a URL. If you need Base64 encoding, use our dedicated Base64 Encoder/Decoder tool. If you have a Base64 string that contains `+`, `/`, or `=` characters and you want to put it in a URL, paste it here and click Encode — those characters will be percent-encoded to `%2B`, `%2F`, and `%3D` respectively.

Su privacidad es nuestra prioridad

Esta herramienta se ejecuta completamente en su navegador. Sus archivos no se suben, almacenan ni analizan.

  • No subimos, almacenamos ni analizamos sus archivos.
  • Todo lo que procesa permanece en su dispositivo.
  • No hay procesamiento del lado del servidor, ni almacenamiento en la nube, ni análisis.

Incluso si su conexión a internet se cae, sus archivos permanecen seguros.

También te podría gustar

Guias utiles

Publicidad