無料ツール

    URLエンコーダー/デコーダー

    安全なURL用に特殊文字をエンコードしたり、パーセントエンコードされた文字列を即座にデコードしたりできます。

    URLエンコード

    URLエンコーディングとは?

    URLエンコーディング(パーセントエンコーディングとも呼ばれる)は、URL内の安全でない文字や予約文字を、%記号とその後に続く2桁の16進数で置き換えるものです。たとえば、スペースは%20になります。これにより、URLがインターネット上で曖昧さなく正しく送信されることが保証されます。

    encodeURIComponent 対 encodeURI

    encodeURIComponent は、英数字および - _ . ! ~ * ' ( ) 以外のすべての文字をエンコードします。クエリパラメータのエンコードに使用してください。encodeURI は、: / ? # [ ] @ などの URL 構造上の文字を保持するため、URL 全体のエンコードに適しています。

    一般的な利用例

    • 特殊文字を含むクエリ文字列パラメータのエンコード
    • APIリクエストやWebhookで使用する文字列の準備
    • サーバーログからパーセントエンコードされたURLのデバッグ
    • スペースやUnicode文字を含むファイルパスのエンコード
    • URL対応形式と人間が読みやすい形式間の変換

    APIとウェブサイトを24時間365日監視する

    Xitoringの稼働時間およびAPI監視機能を活用して、エンドポイントが常にアクセス可能な状態であることを確保しましょう。

    無料モニタリングを開始する

    URL Encoding FAQ

    Common questions about percent-encoding, spaces and double encoding.

    Should a space be encoded as %20 or +?
    In URL paths, a space is always %20. In query strings sent by HTML forms (application/x-www-form-urlencoded), a space can also appear as +. encodeURIComponent always produces %20, which works everywhere.
    What is double encoding?
    Encoding a string that is already encoded: %20 turns into %2520, because the % sign itself gets encoded. It usually happens when two layers of code both encode the same value. Decode the string once to see whether that's what happened.
    Which characters need to be encoded?
    Inside a URL component, everything except letters, digits and - . _ ~ should be encoded. Reserved characters such as & = ? / # need encoding when they are part of a value. Non-ASCII characters are encoded as their UTF-8 bytes, so é becomes %C3%A9.
    Is my input sent to a server?
    No. Encoding and decoding run in your browser, so what you paste never leaves your device.