在瀏覽器中解析 URL 查詢字串為 JSON,或從 JSON 構建查詢字串。
如何使用 查詢字串
選擇轉換方向:查詢轉 JSON,或 JSON 轉查詢。
貼上查詢字串(有無 ? 均可)或 JSON 物件。
複製結果,或互換進行反向轉換。
A query string converter that turns the parameters in a URL into a readable JSON object, and builds a query string back from JSON. It decodes values, and treats repeated keys as arrays in both directions.
It runs locally in your browser, so the URLs you inspect, which can contain tokens or personal data, never leave your device.
A query string is the part of a URL after the question mark, like ?q=shoes&page=2, a list of key-value pairs that pass data to a page or API. They drive search results, filters, pagination and tracking.
When a key appears more than once, such as tag=a&tag=b, it becomes an array in the JSON so no values are lost, and a JSON array expands back into repeated parameters when you build the string.
You can paste a whole URL when converting to JSON: anything before the question mark is ignored, so you do not have to trim it first. This makes it quick to inspect the parameters of a link from your address bar.
Percent-encoded values are decoded when parsing so you can read them, and encoded again when building a query string so the result is valid, which keeps spaces and special characters correct.
常見問題
出現超過一次的鍵,如 tag=a&tag=b,在 JSON 中成為陣列,JSON 中的陣列展開回重複參數。
可以。轉換為 JSON 時,? 之前的部分會被忽略,因此您可以貼上完整的 URL。
會。解析時百分比編碼的值會被解碼,構建查詢字串時會重新編碼。
嵌入此工具
將此工具加入你自己的網站。複製下方的程式碼片段,它會自動保持最新。
<iframe src="https://monu.tools/embed/zh-Hant/query-string-converter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>相關工具