URLエンコーダー / デコーダー
パーセントエンコーディングでURLとクエリ文字列をエンコードまたはデコード。
URL エンコードとは?
一般的なエンコード文字
URL には使用できる文字のセットが限られています。スペース、句読点、非 ASCII 文字(₹ や 中文など)を URL に含める必要がある場合、パーセントエンコード — %XX(XX は文字の 16 進値)への置き換え — が必要です。
このツールはブラウザや JavaScript が内部的に使用するのと同じ関数 encodeURIComponent と decodeURIComponent を使用します。Unicode、絵文字、マルチバイト文字を正しく処理します。
フロントエンド開発者は、API エンドポイントに追加する前にクエリパラメーター値をエンコードします — 「price ≥ ₹500」のような検索クエリは、URL パラメーターとして渡される際に price+%E2%89%A5+%E2%82%B9500 になります。バックエンドエンジニアは、処理前に元のユーザー入力値を抽出するために受信クエリ文字列をデコードします。スペースと特殊文字を含むキャンペーン名をエンコードするために UTM タグ付きマーケティング URL を構築するコンテンツチームが使います。Web スクレイパーは、サイトマップからパーセントエンコードされた URL をデコードして人が読めるページパスを復元します。
完全な URL をエンコードする場合は encodeURI を使用します — /、?、=、& などの構造的な文字を保持するため、URL が機能し続けます。単一のクエリパラメーター値をエンコードする場合は encodeURIComponent を使用します — / や & を含むすべてをエンコードするため、値が誤って URL 構造を壊すことがありません。このツールは encodeURIComponent を使用しており、パラメーター値の安全なデフォルトです。URL 構造を壊さずに完全な URL をエンコードする必要がある場合は、代わりに encodeURI を使用してください。これはどのブラウザのコンソールでも利用できます。
ブラウザのアドレスバーや API レスポンスから URL をコピーして %E2%82%B9 のようなシーケンスが見える場合、デコーダーに貼り付けると元のテキスト(この場合は ₹)が表示されます。メールクライアントと一部の CMS プラットフォームは URL を二重エンコードし、%20 を %2520 に変換します — 元の内容を復元するには 2 回デコードしてください。Web サーバーのログファイルは通常、パーセントエンコードされたリクエストパスを生の形で保存します;このツールを使って、ファイルパスの特殊文字による 404 エラーのデバッグ時に読み取り可能な形にデコードしてください。
- スペース → %20
- & → %26
- = → %3D
- ? → %3F
- / → %2F
- # → %23
- + → %2B
よくある質問
- What is URL encoding?
- URL encoding (also called percent-encoding) converts characters that aren't allowed in a URL into a safe format. Each unsafe character is replaced with a % sign followed by two hex digits. For example, a space becomes %20, and & becomes %26.
- When do I need to encode a URL?
- Whenever you include user input or special characters in a URL — query parameters, path segments, or form data. Characters like spaces, &, =, ?, #, and non-ASCII text (like ₹ or Hindi script) must be encoded to avoid breaking the URL structure.
- What's the difference between encodeURI and encodeURIComponent?
- encodeURI encodes a full URL and leaves structural characters like / ? & = intact. encodeURIComponent (what this tool uses) encodes everything except letters, digits, and - _ . ! ~ * ' ( ) — making it safe for individual query parameter values.
- Is my data sent to a server?
- No. Encoding and decoding happen in your browser using JavaScript's built-in encodeURIComponent and decodeURIComponent functions. Nothing is uploaded.
関連ツール
- JSON Formatter, Validator & Repair Tool
Format, minify, validate, and repair JSON instantly in your browser. Sort keys alphabetically, auto-format on paste, download as file, escape/unescape strings — free, no sign-up, 100% client-side.
- QRコード生成
URL、テキスト、Wi-FiなどのQRコードを生成。PNGでダウンロード可能。
- パスワード生成
カスタム長と文字セットで強力なランダムパスワードを生成。
- Base64 エンコーダー / デコーダー
テキストをBase64にエンコード、または逆にデコード。
- ハッシュ生成
SHA-1、SHA-256、SHA-384、SHA-512ハッシュを瞬時に生成。