URL エンコード/デコード
URLパラメータを安全にエンコードし、復号もできます。
What is URL Encoder / Decoder?
URL Encoder / Decoder converts special characters in URLs to percent-encoded format (e.g. spaces become %20)
and decodes percent-encoded strings back to readable text.
Proper URL encoding ensures that query parameters and path segments are transmitted correctly by browsers and servers.
How to use
- To encode: paste a string with special characters and click Encode.
- To decode: paste a percent-encoded string and click Decode.
- Copy the result with the Copy button.
Notes
- This tool encodes component parts of a URL (e.g. query values), not full URLs. Encoding a full URL would break the
://and/delimiters. - Safe characters (letters, digits,
-,_,.,~) are not encoded. - Spaces can be encoded as
%20(RFC 3986) or+(form encoding). This tool uses%20.
FAQ
- What is the difference between encodeURI and encodeURIComponent?
encodeURIencodes a full URL and leaves structural characters like/,?, and#intact.encodeURIComponentencodes a URL component (query value, path segment) and percent-encodes those structural characters. This tool usesencodeURIComponentbehavior.- Why do I need to encode URL parameters?
- Characters like
&,=, and spaces have special meaning in URLs. If a query value contains those characters without encoding, the URL is misinterpreted by the server. - Can I encode non-ASCII characters?
- Yes. Non-ASCII characters (like Japanese or Arabic letters) are first converted to UTF-8 bytes, then each byte is percent-encoded.
概要
URL部品を安全にエンコードし、エンコード済み文字列をデコードします。クエリパラメータ生成やリンク不具合調査に有効です。
使い方
- 元文字列を貼り付けます。
- エンコードまたはデコードを実行します。
- 結果をURL設定や実装に反映します。
使用例
-
クエリ値エンコード
入力: name=John Doe&city=Tokyo
出力: name%3DJohn%20Doe%26city%3DTokyo
-
デコード
入力: hello%20world
出力: hello world
補足
- 通常はURL全体ではなくパラメータ値をエンコードします。
- 二重エンコードはリンク破損の原因です。
- 予約文字を含む場合は意図どおりか必ず確認してください。
よくある質問
- URL全体をエンコードすべきですか?
- 通常は不要です。値部分のみを対象にしてください。
- %2520になるのはなぜ?
- %20をさらにエンコードした二重エンコードです。
- 元に戻せますか?
- 入力が正しければ可逆です。
Embed this tool
Paste this iframe into any HTML page to embed URL エンコード/デコード on your site: