本文へスキップ
ZeroKit

URLエンコーダー

無料

URLコンポーネントを安全にエンコード・デコードします。

Percent-encoding turns characters that are not allowed in a URL into %XX escapes. This tool converts text with all four built-in JavaScript URI functions and breaks a full URL down into decoded query parameters, without sending the URL anywhere.

Loading tool…
100%ブラウザ内で動作し、何もアップロードされません。·開発者向けツール

URLエンコーダーの使い方

  1. 1Choose one of the four modes: encodeURIComponent, encodeURI, decodeURIComponent or decodeURI.
  2. 2Type or paste the text you want to convert — the result updates as you type.
  3. 3Switch modes or use the Swap button to run the result back through the other direction.
  4. 4Paste a full URL into the query parser to see every parameter decoded in a table.
  5. 5Copy the result, or download it as a text file.

URLエンコーダーのFAQ

What is the difference between encodeURIComponent and encodeURI?

encodeURI keeps characters that are legal in a complete URL, such as /, ? and &, so it is meant for encoding a whole address. encodeURIComponent escapes those characters too, which makes it the right choice for a single query value or path segment.

Why does a query string sometimes contain plus instead of %20?

In HTML form encoding a plus sign stands for a space. Percent-encoding itself reserves the plus sign for a literal plus, so decode form bodies with URLSearchParams or replace plus with a space before decoding.

Why do I get a URI malformed error when decoding?

decodeURI and decodeURIComponent throw when a percent sign is not followed by two hexadecimal digits, or when the bytes do not form valid UTF-8. Repair the escape sequence, or use the query parser which leaves malformed pairs untouched.

Should I encode a whole URL or its individual parts?

Encode each dynamic part separately with encodeURIComponent, then assemble the URL. Running encodeURIComponent over an entire URL also escapes its ? & = separators, which breaks the address.

URLエンコーダーをよく使いますか?

Proなら、すべての広告を取り除き、ファイルサイズの上限を引き上げ、全ツールでバッチモードとプリセット保存を利用できます。

プランを比較 →

関連ツール