เครือข่าย/HTTP
User-Agent Parser
แยกวิเคราะห์สตริง User-Agent เป็นเบราว์เซอร์ เอนจิน ระบบปฏิบัติการ และประเภทอุปกรณ์
The User-Agent string a browser sends with every request looks like a chaotic mix of names and versions, largely because of browsers' historical habit of impersonating each other (nearly every modern browser's string still contains "Mozilla/5.0"). This tool breaks it down into browser, engine, OS, and device type.
How to use it
- Paste a User-Agent string (from your own dev tools console or from server logs) and it's parsed instantly.
- The result shows the browser name and version, the rendering engine, the operating system, and the device type (desktop, mobile, tablet, bot).
- Handy for recognizing bot and crawler strings (Googlebot, Bingbot, etc.), which also send a User-Agent.
Common uses
- Debugging a bug that only shows up in a specific browser or OS — quickly figuring out what the user was actually on from a log entry.
- Analyzing server logs for the share of mobile traffic or outdated browsers among visitors.
- Checking whether a request genuinely came from a legitimate search bot, rather than someone spoofing its User-Agent.
Things to keep in mind
A User-Agent is entirely controlled by the client and easy to spoof — don't rely on it for security decisions.
Under the User-Agent Reduction effort, modern browsers increasingly freeze or simplify OS and device details for privacy — detection accuracy is gradually declining.
บทความเกี่ยวกับเครื่องมือนี้: User-Agent: เหตุใด Chrome ถึงมีคำว่า "Mozilla" และ "Safari"
คำถามที่พบบ่อย
ทำไมสตริง User-Agent จำนวนมากถึงมีคำว่า "Mozilla" แม้แต่ใน Chrome หรือ Safari?
นี่คือร่องรอยทางประวัติศาสตร์ — เบราว์เซอร์ยังคงเพิ่ม "Mozilla/5.0" ในสตริง User-Agent เพื่อความเข้ากันได้กับการตรวจสอบเซิร์ฟเวอร์รุ่นเก่าที่เขียนไว้สำหรับ Netscape Navigator ยุคแรก และธรรมเนียมนี้ไม่เคยหายไป
การแยกวิเคราะห์ User-Agent น่าเชื่อถือแค่ไหนในการตรวจจับเบราว์เซอร์และ OS ที่แท้จริง?
น่าเชื่อถือพอสมควรในกรณีทั่วไป แต่สตริง User-Agent สามารถถูกปลอมแปลงได้ และเบราว์เซอร์บางตัวตอนนี้ตรึงหรือทำให้บางส่วนของสตริงเรียบง่ายขึ้นเพื่อความเป็นส่วนตัว การตรวจจับจึงไม่รับประกันความแม่นยำ
สตริง User-Agent ที่ฉันวางที่นี่ถูกส่งไปที่ไหนหรือไม่?
ไม่ การแยกวิเคราะห์ทำงานทั้งหมดในเบราว์เซอร์ของคุณ ไม่มีการอัปโหลดไปยังเซิร์ฟเวอร์
User-Agent Client Hints คืออะไร?
ทางเลือกสมัยใหม่แทนสตริง User-Agent เดี่ยว — ชุดของเฮดเดอร์แยกต่างหาก (Sec-CH-UA, Sec-CH-UA-Platform เป็นต้น) ที่เซิร์ฟเวอร์ต้องขอมาอย่างชัดเจนและได้รับในรูปแบบที่มีโครงสร้าง แทนที่จะต้องแยกวิเคราะห์สตริงเดียวที่ยัดข้อมูลไว้แน่น
ทำไมเบราว์เซอร์บางตัวถึงซ่อนเวอร์ชัน OS ที่แน่นอนหรือรุ่นอุปกรณ์ใน User-Agent?
เป็นส่วนหนึ่งของความริเริ่ม "User-Agent Reduction" เพื่อความเป็นส่วนตัว — รายละเอียดเวอร์ชัน OS หรือรุ่นอุปกรณ์สามารถใช้ระบุตัวผู้ใช้ได้อย่างเฉพาะเจาะจง (fingerprinting) เบราว์เซอร์จึงค่อย ๆ ทำให้ส่วนเหล่านี้ของสตริงเรียบง่ายขึ้นหรือ "ตรึง" ไว้