URL デコード
パーセントエンコードされたURLを元の文字列に戻す。
URL デコードとは
URLデコードとは、%XX形式にエンコードされた文字列を元の文字に戻す処理です。
🔒 処理はすべてブラウザ内で完結し、データは送信されません。
このツールの前提
- 処理場所
- このページのブラウザ内(JavaScript / Canvas)
- アップロード
- なし — ファイルは端末の外に出ません
- オフライン
- ページを開いた後は通信不要
The plus sign is the trap
decodeURIComponent deliberately does not convert + to a space, because + is a legal character. Form-encoded data does mean space by +. A decoder that always turns + into a space is correct for query strings and wrong for everything else — notably for Base64 values, which frequently contain + and would come back corrupted in exactly the place you would not look.
So the correct behaviour depends on where the string came from. If it was produced by an HTML form submission, decode + as space. If it came out of a JSON body, a path segment or a JWT, leave + alone. This tool exposes both modes because picking one silently is how data gets corrupted.
Isolated percent signs throw
decodeURIComponent raises URIError on a malformed sequence: a % not followed by two hex digits, or a truncated sequence at the end of the string. A literal 100% discount in a value is enough to trigger it. The fix is to encode the percent sign itself as %25 before decoding, or to decode with a tolerant routine that passes malformed sequences through unchanged.
Mixed encoding inside one string is the second case. If half the value is already decoded and half is not — common when a templating engine escapes a piece of an already-escaped URL — one pass yields a half-correct result. Run decoding repeatedly until the output stops changing, and if it never stops, the original was double-encoded on purpose and you should stop earlier.
Reading the result correctly
Percent-encoding describes bytes, not characters. When those bytes are not valid UTF-8 the decoded text contains U+FFFD, which means either the source used a different charset (Latin-1 and GBK both appear in old links) or the string was cut mid-character by a URL length limit.
For CJK content, a truncated link usually breaks on the last character only. If the tail is garbled but the rest is clean, the source was truncated, not mis-encoded — re-copy the full URL rather than trying other charsets.
使い方
- 1.エンコード済み文字列を入力
- 2.デコード
- 3.結果を確認
他の方法との比較
同じ変換をする方法は 3 つあります。ブラウザ内(このページ)、サーバー側の変換サービス、デスクトップアプリ。差がつくのは速度ではなく、ファイルがどこへ行くかと、無料でどこまでできるかです。
| 観点 | このツール | サーバー側の変換サービス | デスクトップアプリ |
|---|---|---|---|
| ファイルの処理場所 | このページのブラウザ内 | ベンダーのサーバー(アップロード後) | 自分の PC(アプリをインストール) |
| アカウント | 不要 | 多くの場合必要(無料枠の制限解除に登録を求める) | 不要(ライセンス認証は必要な場合あり) |
| 無料で扱えるサイズ | サイズ制限なし(回数制限もなし) | 数ファイル/時間、または 5〜10MB 程度で課金 wall | ディスクとメモリ次第 |
| 料金 | 無料。Pro は月 $9(大きいファイルと AI 機能のみ) | サブスクが一般的。おおむね月 $7〜15(2026 年 11 月時点) | 買い切り、またはサブスク |
| オフライン | 一度開けば通信不要 | 不可 | 可 |
| 20MB を処理し始めるまで | 待ち時間なし(アップロードが無い) | アップロードが支配的(10Mbps 上りで約 16 秒) | アプリの起動のみ |
| 保証できないこと | 出力は決定的です。他の実装と突き合わせて検証できます | 同じ(変換の原理は変わらない) | 同じ。ただし書式の再現はより忠実な場合がある |
サーバー側のサービスが優れている点は明確にあります。巨大なファイル、チームでの共有、変換履歴の管理、スクリプトからの自動化。逆に「1 回だけ、手元のファイルを別形式にしたい」という今回の用途では、アップロードの待ち時間と登録の手間だけが増えます。
よくある質問
URLデコードとは?
%E6%97%A5%E6%9C%AC のような文字列を元の文字に戻す処理です。
安全ですか?
ブラウザ内で処理するのでデータは送信されません。
この変換で失われるもの
エンコードとハッシュは Web Crypto API または純 JavaScript 実装で行います。出力は決定的で、同じ入力からは常に同じ結果になります。他のツールと突き合わせて検証できます。