เครือข่าย/HTTP
URL Parser
แยกส่วนประกอบของ URL — โปรโตคอล โฮสต์ พอร์ต เส้นทาง พารามิเตอร์คิวรี แฟรกเมนต์
A URL is made of several parts — protocol, host, port, path, query parameters, and a fragment — that are easy to mix up when reading a long link. This tool breaks a URL down into those parts and shows each one separately.
How to use it
- Paste any URL and it's split into protocol, host, port, path, query parameters, and fragment (#) instantly.
- Query parameters are listed as separate key-value pairs, even when there are many or they repeat.
- The port is shown explicitly even when the URL doesn't specify one (in which case the protocol's default applies — 80 for HTTP, 443 for HTTPS).
Common uses
- Quickly reading a long link cluttered with dozens of tracking parameters (utm_*, ref, fbclid, and so on).
- Checking exactly which host and port a link from someone else will actually open.
- Debugging redirects or malformed URLs in code — you can see exactly which part differs from what's expected.
Things to keep in mind
The fragment (the part after #) is never sent to the server — it's a purely client-side part of the URL the server never even sees.
Hosts with non-ASCII characters (Cyrillic, CJK) are actually transmitted over the network in punycode (xn--...), even when the browser's address bar shows plain letters.
บทความเกี่ยวกับเครื่องมือนี้: การแยกส่วน URL: ที่อยู่เว็บประกอบด้วยส่วนใดบ้าง
คำถามที่พบบ่อย
"host" กับ "origin" ของ URL ต่างกันอย่างไร?
host คือแค่โดเมนและพอร์ต (example.com:8080) ในขณะที่ origin รวมถึงสคีมด้วย (https://example.com:8080) — URL สองอันต้องตรงกันทั้งสามอย่างจึงจะมี origin เดียวกัน
ทำไมเส้นทางที่แยกวิเคราะห์บางครั้งดูต่างจากที่ฉันพิมพ์?
เบราว์เซอร์และตัวแยกวิเคราะห์ทำให้ URL เป็นมาตรฐาน — ยุบส่วน "./" และ "../" ถอดรหัสอักขระที่เข้ารหัสแบบเปอร์เซ็นต์บางตัว และเพิ่มเครื่องหมายทับท้ายให้โดเมนเปล่า ๆ — ผลลัพธ์ที่แยกวิเคราะห์จึงสะท้อนรูปแบบที่แก้ไขแล้วตามมาตรฐาน
การแยกวิเคราะห์ URL ที่นี่ส่งมันไปที่ไหนหรือไม่?
ไม่ การแยกวิเคราะห์ทำงานทั้งหมดในเบราว์เซอร์ของคุณโดยใช้ URL API ดั้งเดิม ไม่มีการส่งไปยังเซิร์ฟเวอร์
userinfo ใน URL คืออะไร และเหตุใดจึงอันตราย?
ส่วน "ชื่อผู้ใช้:รหัสผ่าน@" ก่อนโฮสต์ถูกออกแบบมาสำหรับข้อมูลรับรอง แต่ผู้โจมตีใช้มันเพื่อปลอมลิงก์ฟิชชิง: https://accounts.google.com@evil.com/ จริง ๆ แล้วพาไปที่ evil.com ไม่ใช่ Google
ทำไมโฮสต์ใน URL บางอันดูเหมือนสตริงไร้ความหมายที่ขึ้นต้นด้วย xn--?
นั่นคือการเข้ารหัส punycode สำหรับชื่อโดเมนสากล (IDN) — วิธีแสดงโดเมนที่มีอักขระซีริลลิก CJK หรืออักขระนอก ASCII อื่น ๆ ในรูปแบบที่เข้ากันได้กับระบบ DNS แบบเก่า