URL Encoder & Decoder
Percent-Encoding
Percent-encode or decode URL text with encodeURIComponent or encodeURI for query strings, redirects, and API parameters.
This conversion runs only in your browser — nothing is uploaded.
Spaces become %20 (not +). Default is Component mode for query values; Full URI leaves reserved punctuation.
- Input0
- Output0
- OptionsComponent (encodeURIComponent)
Input
Output
What is this tool?
This URL encoder and decoder applies percent-encoding so reserved characters, spaces, and Unicode can travel safely in query strings, path segments, redirect parameters, and API calls.
Choose Component (encodeURIComponent, default) for a single value, or Full URI (encodeURI) when you want to keep :, /, ?, and & readable in a whole URL. Conversion updates live; nothing leaves your browser.
Percent-encoding is not encryption. Anyone can decode the result.
Common use cases
- Encode a query parameter value that contains spaces,
&, or= - Prepare or inspect a nested redirect URL before putting it in
?redirect= - Decode a percent-encoded log line or API error to readable text
How to use
- Choose Encode or Decode. Results update as you type.
- Leave Full URI off for query/path values (Component). Turn it on only when encoding an entire URL string.
- Paste text or a percent-encoded string. Use Sample to compare Component vs Full URI.
- Copy the output. If decode fails, look for
%ZZ, a trailing%, or truncated UTF-8.
encodeURI vs encodeURIComponent
| Input | Component (encodeURIComponent) | Full URI (encodeURI) |
|---|---|---|
a b&c=1 | a%20b%26c%3D1 | a%20b&c=1 |
https://ex.com/a?b=1 | https%3A%2F%2Fex.com%2Fa%3Fb%3D1 | https://ex.com/a?b=1 |
a+b=c | a%2Bb%3Dc | a+b=c |
Use Component for values you will place inside a query or path. Use Full URI only when the input is already a complete URL and you want separators preserved.
Examples
| Input / setting | Output | Notes |
|---|---|---|
hello world → Component encode | hello%20world | Spaces become %20. |
a b&c=1 → Component encode | a%20b%26c%3D1 | & and = are encoded for a single value. |
a b&c=1 → Full URI encode | a%20b&c=1 | Reserved punctuation stays; space still %20. |
hello+world → Component decode | hello+world | + is a literal plus here—not a form-urlencoded space (edge vs many form parsers). |
Practical pitfalls
- Do not Component-encode an entire URL unless you intend every
/and?to become%2F/%3F(common redirect bug). application/x-www-form-urlencodedtreats+as space;decodeURIComponentdoes not. Prefer%20for URL components.- Encoding is not access control—encoded secrets in query strings still appear in logs and Referer headers.
References
이 도구는 무엇인가요?
URL 퍼센트 인코딩·디코딩 도구입니다. 예약 문자, 공백, 유니코드가 쿼리·경로·리다이렉트·API 파라미터에서 안전하게 전달되도록 변환합니다.
컴포넌트(encodeURIComponent, 기본)는 단일 값용이고, 전체 URI(encodeURI)는 :, /, ?, &를 남깁니다. 입력하면 결과가 바로 갱신되며, 변환은 브라우저에서만 실행됩니다.
퍼센트 인코딩은 암호화가 아닙니다.
자주 쓰는 경우
- 공백·
&·=가 들어 있는 쿼리 파라미터 값 인코딩 ?redirect=에 넣을 중첩 URL 준비·검증- 퍼센트 인코딩된 로그·API 오류를 읽기 쉬운 텍스트로 복원
사용 방법
- Encode 또는 Decode를 선택합니다. 입력하면 결과가 바로 갱신됩니다.
- 쿼리·경로 값이면 전체 URI를 끄고(컴포넌트), URL 전체를 다룰 때만 켭니다.
- 텍스트나 인코딩 문자열을 붙여넣습니다. Sample로 두 모드 차이를 확인하세요.
- 결과를 복사합니다. 디코딩 오류 시
%ZZ, 끝의%, 잘린 UTF-8을 확인합니다.
encodeURI vs encodeURIComponent
| 입력 | 컴포넌트 (encodeURIComponent) | 전체 URI (encodeURI) |
|---|---|---|
a b&c=1 | a%20b%26c%3D1 | a%20b&c=1 |
https://ex.com/a?b=1 | https%3A%2F%2Fex.com%2Fa%3Fb%3D1 | https://ex.com/a?b=1 |
a+b=c | a%2Bb%3Dc | a+b=c |
값만 넣을 때는 컴포넌트, URL 구조가 이미 있을 때만 전체 URI를 쓰세요.
예시
| 입력 / 설정 | 출력 | 메모 |
|---|---|---|
hello world → 컴포넌트 인코딩 | hello%20world | 공백 → %20 |
a b&c=1 → 컴포넌트 | a%20b%26c%3D1 | 단일 값용으로 &·= 인코딩 |
a b&c=1 → 전체 URI | a%20b&c=1 | 예약 구두점 유지, 공백은 %20 |
hello+world → 컴포넌트 디코딩 | hello+world | 여기서 +는 리터럴(폼의 공백 규칙과 다름) |
실무에서 흔한 실수
- 리다이렉트용 전체 URL을 컴포넌트 모드로 인코딩하면
/,?까지%2F,%3F가 됩니다. - 폼(
application/x-www-form-urlencoded)은+를 공백으로 보지만decodeURIComponent는 그렇지 않습니다. URL 컴포넌트에는%20을 쓰세요. - 인코딩은 접근 제어가 아닙니다. 쿼리의 비밀 값은 로그·Referer에 남을 수 있습니다.
참고자료
このツールについて
URL のパーセントエンコード/デコードを行います。予約文字・空白・Unicode をクエリ、パス、リダイレクト、API パラメータで安全に扱えます。
コンポーネント(encodeURIComponent、既定)は単一値向け、フル URI(encodeURI)は :, /, ?, & を残します。入力すると結果がライブ更新され、変換はブラウザ内だけです。
パーセントエンコードは暗号化ではありません。
よくある用途
- 空白や
&、=を含むクエリ値のエンコード ?redirect=に入れる入れ子 URL の準備・確認- パーセントエンコードされたログや API エラーを読める文字列へ戻す
使い方
- Encode / Decode を選びます。入力で結果が更新されます。
- クエリ/パス値ならフル URI をオフ(コンポーネント)。URL 全体のときだけオンにします。
- テキストまたはエンコード文字列を貼ります。Sample で両モードを比較できます。
- 出力をコピーします。失敗時は
%ZZ、末尾の%、切り捨てられた UTF-8 を確認します。
encodeURI vs encodeURIComponent
| 入力 | コンポーネント (encodeURIComponent) | フル URI (encodeURI) |
|---|---|---|
a b&c=1 | a%20b%26c%3D1 | a%20b&c=1 |
https://ex.com/a?b=1 | https%3A%2F%2Fex.com%2Fa%3Fb%3D1 | https://ex.com/a?b=1 |
a+b=c | a%2Bb%3Dc | a+b=c |
値を埋め込むときはコンポーネント、既に完全な URL ならフル URI を使います。
例
| 入力 / 設定 | 出力 | メモ |
|---|---|---|
hello world → コンポーネント | hello%20world | 空白 → %20 |
a b&c=1 → コンポーネント | a%20b%26c%3D1 | 単一値向けに &・= をエンコード |
a b&c=1 → フル URI | a%20b&c=1 | 予約記号は残し、空白は %20 |
hello+world → コンポーネント復号 | hello+world | + は文字そのもの(フォームの空白規則とは別) |
実務での落とし穴
- リダイレクト用の完全 URL をコンポーネントでエンコードすると
/や?まで%2F/%3Fになります。 - フォーム(
application/x-www-form-urlencoded)は+を空白とみなしますが、decodeURIComponentはしません。URL 部品には%20を使ってください。 - エンコードはアクセス制御ではありません。クエリ内の秘密はログや Referer に残ることがあります。
参考資料
¿Qué es esta herramienta?
Codifica y decodifica texto URL con percent-encoding para que espacios, Unicode y caracteres reservados viajen bien en consultas, rutas, redirecciones y APIs.
Componente (encodeURIComponent, predeterminado) es para un valor; URI completa (encodeURI) deja :, /, ? y &. La conversión es en vivo y solo en el navegador.
No es cifrado.
Casos de uso comunes
- Codificar un parámetro de consulta con espacios,
&o= - Preparar o revisar una URL de redirección anidada en
?redirect= - Decodificar una línea de log o error de API percent-encoded
Cómo usar
- Elige Encode o Decode; el resultado se actualiza al escribir.
- Deja URI completa apagada para valores de consulta/ruta. Actívala solo para una URL entera.
- Pega texto o una cadena percent-encoded. Usa Sample para comparar modos.
- Copia la salida. Si falla el decode, busca
%ZZ, un%suelto o UTF-8 truncado.
encodeURI vs encodeURIComponent
| Entrada | Componente (encodeURIComponent) | URI completa (encodeURI) |
|---|---|---|
a b&c=1 | a%20b%26c%3D1 | a%20b&c=1 |
https://ex.com/a?b=1 | https%3A%2F%2Fex.com%2Fa%3Fb%3D1 | https://ex.com/a?b=1 |
a+b=c | a%2Bb%3Dc | a+b=c |
Usa Componente para valores dentro de una consulta o ruta; URI completa solo si la entrada ya es una URL completa.
Ejemplos
| Entrada / opción | Salida | Notas |
|---|---|---|
hello world → Componente | hello%20world | Espacios → %20 |
a b&c=1 → Componente | a%20b%26c%3D1 | Codifica & y = para un solo valor |
a b&c=1 → URI completa | a%20b&c=1 | Conserva puntuación reservada |
hello+world → Decode Componente | hello+world | + literal, no espacio de formulario |
Errores prácticos
- Codificar toda una URL en modo Componente convierte
/y?en%2F/%3F(error típico de redirect). application/x-www-form-urlencodedtrata+como espacio;decodeURIComponentno. Prefiere%20en componentes URL.- Codificar no es control de acceso: los secretos en la query siguen en logs y Referer.
Referencias
Qu'est-ce que cet outil ?
Encode et décode du texte URL en pourcent pour que espaces, Unicode et caractères réservés circulent dans les requêtes, chemins, redirections et API.
Composant (encodeURIComponent, défaut) pour une valeur ; URI complète (encodeURI) conserve :, /, ?, &. Conversion en direct, uniquement dans le navigateur.
Ce n’est pas du chiffrement.
Cas d'usage courants
- Encoder une valeur de requête avec espaces,
&ou= - Préparer ou inspecter une URL de redirection imbriquée dans
?redirect= - Décoder une ligne de log ou une erreur API percent-encoded
Comment utiliser
- Choisissez Encode ou Decode ; le résultat suit la saisie.
- Laissez URI complète désactivée pour les valeurs de requête/chemin. Activez-la seulement pour une URL entière.
- Collez le texte ou la chaîne encodée. Sample compare les deux modes.
- Copiez la sortie. En cas d’échec, cherchez
%ZZ, un%isolé ou de l’UTF-8 tronqué.
encodeURI vs encodeURIComponent
| Entrée | Composant (encodeURIComponent) | URI complète (encodeURI) |
|---|---|---|
a b&c=1 | a%20b%26c%3D1 | a%20b&c=1 |
https://ex.com/a?b=1 | https%3A%2F%2Fex.com%2Fa%3Fb%3D1 | https://ex.com/a?b=1 |
a+b=c | a%2Bb%3Dc | a+b=c |
Utilisez Composant pour une valeur dans une requête ou un chemin ; URI complète seulement si l’entrée est déjà une URL complète.
Exemples
| Entrée / réglage | Sortie | Notes |
|---|---|---|
hello world → Composant | hello%20world | Espaces → %20 |
a b&c=1 → Composant | a%20b%26c%3D1 | Encode & et = pour une seule valeur |
a b&c=1 → URI complète | a%20b&c=1 | Ponctuation réservée conservée |
hello+world → Decode Composant | hello+world | + littéral, pas l’espace des formulaires |
Pièges courants
- Encoder toute une URL en mode Composant transforme
/et?en%2F/%3F(bug de redirect fréquent). application/x-www-form-urlencodedtraite+comme espace ;decodeURIComponentnon. Préférez%20pour les composants URL.- Encoder n’est pas un contrôle d’accès : les secrets en query restent dans les journaux et Referer.
Références
这个工具是什么?
对 URL 文本做百分号编解码,使空格、Unicode 和保留字符能安全出现在查询、路径、重定向参数和 API 调用中。
组件(encodeURIComponent,默认)用于单个值;完整 URI(encodeURI)保留 :, /, ?, &。输入即更新,仅在浏览器中运行。
百分号编码不是加密。
常见用途
- 编码含空格、
&或=的查询参数值 - 准备或检查放进
?redirect=的嵌套 URL - 把百分号编码的日志或 API 错误还原为可读文本
如何使用
- 选择 Encode 或 Decode;输入时结果实时更新。
- 查询/路径值保持关闭完整 URI(组件模式);仅在处理整段 URL 时打开。
- 粘贴文本或编码字符串。用 Sample 对比两种模式。
- 复制结果。解码失败时检查
%ZZ、单独的%或截断的 UTF-8。
encodeURI vs encodeURIComponent
| 输入 | 组件 (encodeURIComponent) | 完整 URI (encodeURI) |
|---|---|---|
a b&c=1 | a%20b%26c%3D1 | a%20b&c=1 |
https://ex.com/a?b=1 | https%3A%2F%2Fex.com%2Fa%3Fb%3D1 | https://ex.com/a?b=1 |
a+b=c | a%2Bb%3Dc | a+b=c |
把值放进查询或路径时用组件;输入已是完整 URL 且需保留分隔符时用完整 URI。
示例
| 输入 / 设置 | 输出 | 说明 |
|---|---|---|
hello world → 组件编码 | hello%20world | 空格 → %20 |
a b&c=1 → 组件 | a%20b%26c%3D1 | 为单个值编码 & 与 = |
a b&c=1 → 完整 URI | a%20b&c=1 | 保留保留标点,空格仍为 %20 |
hello+world → 组件解码 | hello+world | 此处 + 是字面量,不是表单空格 |
实践中的常见误区
- 用组件模式编码整段重定向 URL 会把
/、?变成%2F/%3F。 application/x-www-form-urlencoded把+当空格;decodeURIComponent不会。URL 组件请用%20。- 编码不是访问控制——查询里的秘密仍可能出现在日志和 Referer 中。
参考资料
這個工具是什麼?
對 URL 文字做百分號編解碼,讓空白、Unicode 與保留字元能安全出現在查詢、路徑、重新導向參數與 API 呼叫中。
元件(encodeURIComponent,預設)用於單一值;完整 URI(encodeURI)保留 :, /, ?, &。輸入即更新,僅在瀏覽器中執行。
百分號編碼不是加密。
常見用途
- 編碼含空白、
&或=的查詢參數值 - 準備或檢查放進
?redirect=的巢狀 URL - 把百分號編碼的日誌或 API 錯誤還原為可讀文字
如何使用
- 選擇 Encode 或 Decode;輸入時結果即時更新。
- 查詢/路徑值保持關閉完整 URI(元件模式);僅在處理整段 URL 時開啟。
- 貼上文字或編碼字串。用 Sample 對比兩種模式。
- 複製結果。解碼失敗時檢查
%ZZ、單獨的%或截斷的 UTF-8。
encodeURI vs encodeURIComponent
| 輸入 | 元件 (encodeURIComponent) | 完整 URI (encodeURI) |
|---|---|---|
a b&c=1 | a%20b%26c%3D1 | a%20b&c=1 |
https://ex.com/a?b=1 | https%3A%2F%2Fex.com%2Fa%3Fb%3D1 | https://ex.com/a?b=1 |
a+b=c | a%2Bb%3Dc | a+b=c |
把值放進查詢或路徑時用元件;輸入已是完整 URL 且需保留分隔符時用完整 URI。
範例
| 輸入 / 設定 | 輸出 | 說明 |
|---|---|---|
hello world → 元件編碼 | hello%20world | 空白 → %20 |
a b&c=1 → 元件 | a%20b%26c%3D1 | 為單一值編碼 & 與 = |
a b&c=1 → 完整 URI | a%20b&c=1 | 保留保留標點,空白仍為 %20 |
hello+world → 元件解碼 | hello+world | 此處 + 是字面量,不是表單空白 |
實務上常見陷阱
- 用元件模式編碼整段重新導向 URL 會把
/、?變成%2F/%3F。 application/x-www-form-urlencoded把+當空白;decodeURIComponent不會。URL 元件請用%20。- 編碼不是存取控制——查詢裡的秘密仍可能出現在日誌與 Referer 中。
參考資料
Last reviewed: 2026-07-26
Frequently asked questions
- What is the difference between Component and Full URI mode?
- Component mode uses encodeURIComponent / decodeURIComponent and encodes reserved characters such as &, =, ?, and /. Full URI mode uses encodeURI / decodeURI and leaves those separators so a whole URL structure can stay readable while unsafe characters are still escaped.
- Why is a space encoded as %20 instead of +?
- This tool follows percent-encoding (RFC 3986 / encodeURIComponent). The + for spaces appears in application/x-www-form-urlencoded bodies, not in encodeURIComponent. A literal + becomes %2B in Component mode.
- Why does decoding fail?
- Malformed percent sequences such as %ZZ, a lone %, or incomplete UTF-8 byte sequences cannot be decoded safely. Fix the escapes or paste a complete encoded value.
- Is data sent to a server?
- No. Encode and decode run only in your browser.