開発ツール/URLエンコーダー/デコーダー
URLエンコーダー/デコーダー
URLコンポーネントとクエリ文字列のエンコードまたはデコード
入力
出力
結果がここに表示されます...オプション
URL Encoding Guide
Learn how to encode and decode URLs properly
What is URL Encoding?
URL encoding converts characters into a format that can be safely transmitted over the Internet. Special characters like spaces, &, ?, and = are converted to percent-encoded values (e.g., space becomes %20).
How to Use This Tool
- Enter a URL or text containing special characters
- Choose between full URL encoding or component encoding
- Click 'Encode' or 'Decode' as needed
- Copy the result using the copy button
Pro Tips
- Use 'Encode Component' for query parameter values only
- Full URL encoding preserves the URL structure (://, /, etc.)
- Always encode user input before adding it to URLs to prevent injection
Browser Support
URL encoding uses the standard encodeURIComponent() and encodeURI() functions available in all modern browsers.
よくある質問
encodeURIとencodeURIComponentの違いは何ですか?
encodeURIは完全なURLをエンコードし、:、/、?、&、=などのURL構造文字は保持します。encodeURIComponentはクエリパラメータ値のようにURLの一部をエンコードし、すべての特殊文字をエンコードします。
スペースはどのようにエンコードされますか?
URLではスペースは%20としてエンコードされます。フォームデータでは+記号で表現されることもあります。どちらの方式も有効ですが、%20がより一般的な標準です。
日本語URLはどのように処理されますか?
日本語はUTF-8でエンコードされた後、パーセントエンコーディングされます。例えば「日本語」は'%E6%97%A5%E6%9C%AC%E8%AA%9E'に変換されます。ブラウザのアドレスバーでは見やすく日本語で表示されますが、実際のリクエストではエンコードされます。
URLエンコードが必要な特殊文字は何ですか?
スペース、#、%、&、+、/、=、?などはURLで特別な意味を持つためエンコードが必要です。アルファベット、数字、-、_、.、~はエンコードする必要がありません。
二重エンコードを防ぐにはどうすればよいですか?
すでにエンコードされたURLを再度エンコードすると、%が%25に変換されて問題が発生します。エンコード前にまずデコードを試みるか、エンコード済みかどうかを確認してください。このツールは入力値を分析して適切に処理します。