Monu Tools

แปลง Query String เป็น JSON

แยกวิเคราะห์ URL query string เป็น JSON และสร้าง query string จาก JSON ในเบราว์เซอร์ของคุณ

วิธีใช้ Query String

  1. 01

    เลือกทิศทาง: query เป็น JSON หรือ JSON เป็น query

  2. 02

    วาง query string (มีหรือไม่มี ?) หรือ JSON object

  3. 03

    คัดลอกผลลัพธ์ หรือ swap เพื่อแปลงกลับ

Parse and build query strings

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.

What a query string is

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.

Repeated keys and full URLs

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.

Decoding and encoding

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.

คำถามที่พบบ่อย

จะเกิดอะไรขึ้นกับ parameters ที่ซ้ำกัน?

key ที่ปรากฏมากกว่าหนึ่งครั้ง เช่น tag=a&tag=b กลายเป็น array ใน JSON และ arrays ใน JSON ขยายกลับเป็น parameters ที่ซ้ำกัน

สามารถวาง URL เต็มได้ไหม?

ใช่ เมื่อแปลงเป็น JSON ทุกอย่างก่อน ? จะถูกละเว้น ดังนั้นคุณสามารถวาง URL ทั้งหมด

ค่าถูก decode ไหม?

ใช่ ค่าที่ encode แบบ percent ถูก decode เมื่อแยกวิเคราะห์และ encode ใหม่เมื่อสร้าง query string

แหล่งข้อมูล

ฝังเครื่องมือนี้

เพิ่มเครื่องมือนี้ลงในเว็บไซต์ของคุณเอง คัดลอกสคริปต์ด้านล่าง โดยจะอัปเดตให้เป็นปัจจุบันโดยอัตโนมัติ

<iframe src="https://monu.tools/embed/th/query-string-converter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

เครื่องมือที่เกี่ยวข้อง