πŸ₯Pill Identifier

Identify unknown pills, tablets, and capsules instantly using imprint codes, colors, shapes, and sizes. Our free FDA-approved medication identifier helps you stay safe and informed.

⚠️
Important Medical Disclaimer
This tool is for informational purposes only and should not replace professional medical advice. Always consult with your healthcare provider or pharmacist before taking any unknown medication. Never take pills that have not been prescribed to you.

πŸ€” What Is a Pill Identifier?

Think of a detective for mystery medications - that's a pill identifier! It matches pills by their imprint codes, colors, and shapes to tell you exactly what medication you're looking at. Perfect for organizing medicine cabinets or identifying unmarked pills safely.

πŸ§ͺ Try Common Pill Examples

πŸ’Š Tylenol (L484)
White, Oval, Acetaminophen 500mg
πŸ’Š Ibuprofen (I2)
Brown, Round, 200mg
πŸ’Š Aspirin (44175)
White, Round, 325mg
πŸ’Š Benadryl (44329)
Pink, Capsule, 25mg
πŸ’Š Lisinopril (3973 V)
Pink, Round, 10mg
πŸ’Š Metformin (IP 178)
White, Oval, 500mg
`).join(''); container.innerHTML = resultHTML; } container.style.display = 'block'; // 결과둜 슀크둀 container.scrollIntoView({ behavior: 'smooth', block: 'start' }); } // μƒ˜ν”Œ μ‚¬μš© function useSample(sampleId) { const samples = { 'tylenol': { imprint: 'L484', color: 'white', shape: 'oval', type: 'tablet' }, 'ibuprofen': { imprint: 'I2', color: 'brown', shape: 'round', type: 'tablet' }, 'aspirin': { imprint: '44175', color: 'white', shape: 'round', type: 'tablet' }, 'benadryl': { imprint: '44329', color: 'pink', shape: 'oblong', type: 'capsule' }, 'lisinopril': { imprint: '3973 V', color: 'pink', shape: 'round', type: 'tablet' }, 'metformin': { imprint: 'IP 178', color: 'white', shape: 'oval', type: 'tablet' } }; const sample = samples[sampleId]; if (sample) { document.getElementById('imprintCode').value = sample.imprint; document.getElementById('pillColor').value = sample.color; document.getElementById('pillShape').value = sample.shape; document.getElementById('pillType').value = sample.type; // 검색 λ²„νŠΌμœΌλ‘œ 슀크둀 document.getElementById('searchBtn').scrollIntoView({ behavior: 'smooth', block: 'center' }); // λ²„νŠΌ κ°•μ‘° const btn = document.getElementById('searchBtn'); btn.style.animation = 'pulse 0.5s ease-in-out'; setTimeout(() => btn.style.animation = '', 500); } } // ========== UTILITY FUNCTIONS ========== // μ—λŸ¬ ν‘œμ‹œ function showError(elementId, message) { const errorElement = document.getElementById(elementId); if (errorElement) { errorElement.textContent = message; } } // μ—λŸ¬ 클리어 function clearErrors() { document.querySelectorAll('.error').forEach(el => el.textContent = ''); } // μ•Œλ¦Ό ν† μŠ€νŠΈ ν‘œμ‹œ function showNotification(message, type = 'success') { const toast = document.createElement('div'); toast.className = `toast ${type}`; toast.textContent = message; document.body.appendChild(toast); setTimeout(() => { toast.remove(); }, 3000); } // OTA μ„Ήμ…˜ ν‘œμ‹œ function showOTA() { const otaContainer = document.getElementById('otaContainer'); if (otaContainer && (otaContainer.style.display === 'none' || !otaContainer.style.display)) { otaContainer.style.display = 'block'; setTimeout(() => { const otaHeader = document.querySelector('.ota-header h3'); if (otaHeader) { otaHeader.style.animation = 'pulse 1s ease-in-out'; } }, 100); } } // μ• λ„λ¦¬ν‹±μŠ€ 좔적 function trackEvent(eventName, data = {}) { if (typeof gtag !== 'undefined') { gtag('event', eventName, { 'event_category': TOOL_CONFIG.category, 'event_label': TOOL_CONFIG.name, ...data }); } } // ========== AI ASSISTANT FUNCTIONS ========== // AI λͺ¨λ‹¬ μ—΄κΈ° function openAIModal() { const modal = document.getElementById('aiModal'); if(modal) modal.classList.add('show'); if (aiModalState.apiKey && aiModalState.currentView === 'gemini') { showGeminiChat(); } else { showAISelector(); } updateAPIKeyStatus(); } // AI λͺ¨λ‹¬ λ‹«κΈ° function closeAIModal() { const modal = document.getElementById('aiModal'); if(modal) modal.classList.remove('show'); setTimeout(() => { aiModalState.currentView = 'selector'; showAISelector(); }, 300); } // AI 선택 ν™”λ©΄ ν‘œμ‹œ function showAISelector() { document.getElementById('aiModalTitle').textContent = 'Choose Your AI Assistant'; document.getElementById('aiSelector').style.display = 'flex'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'selector'; } // Gemini μ±„νŒ… ν™”λ©΄ ν‘œμ‹œ function showGeminiChat() { document.getElementById('aiModalTitle').innerHTML = '✨ Gemini AI Assistant'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'flex'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'gemini'; const chatMessages = document.getElementById('chatMessages'); if (!chatMessages.innerHTML.trim()) { addMessage('assistant', `Hello! I can help you with: β€’ How to identify pills safely β€’ Understanding imprint codes β€’ Medication safety information β€’ What to do with unknown pills β€’ Reading pill characteristics What would you like to know about pill identification?`); } } // API ν‚€ μ„€μ • ν™”λ©΄ ν‘œμ‹œ function showAPIKeySetup() { document.getElementById('aiModalTitle').textContent = 'Setup Gemini API'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'block'; aiModalState.currentView = 'setup'; } // AI 선택 처리 function selectAI(aiType) { const currentPill = document.getElementById('imprintCode').value; switch(aiType) { case 'chatgpt': const toolContext = `I need help with ${TOOL_CONFIG.name} tool. I'm trying to identify a pill with imprint "${currentPill}". Can you help me understand pill identification and safety?`; const chatUrl = `https://chat.openai.com/?q=${encodeURIComponent(toolContext)}`; window.open(chatUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'chatgpt' }); break; case 'claude': const claudeContext = `I need help with ${TOOL_CONFIG.name} tool. I'm trying to identify a pill with imprint "${currentPill}". Can you help me understand pill identification and medication safety?`; const claudeUrl = `https://claude.ai/chat?q=${encodeURIComponent(claudeContext)}`; window.open(claudeUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'claude' }); break; case 'gemini': if (!aiModalState.apiKey) { showAPIKeySetup(); } else { showGeminiChat(); } trackEvent('ai_selection', { ai_type: 'gemini' }); break; } } // API ν‚€ μ €μž₯ function saveGeminiApiKey() { const apiKey = document.getElementById('geminiApiKeyInput').value.trim(); if (apiKey) { localStorage.setItem('geminiApiKey', apiKey); aiModalState.apiKey = apiKey; showGeminiChat(); updateAPIKeyStatus(); } else { alert('Please enter a valid API key'); } } // API ν‚€ μƒνƒœ μ—…λ°μ΄νŠΈ function updateAPIKeyStatus() { const statusEl = document.getElementById('apiKeyStatus'); if (aiModalState.apiKey) { statusEl.innerHTML = 'Change API Key'; } else { statusEl.textContent = 'No API key set'; } } // μ±„νŒ… λ©”μ‹œμ§€ μΆ”κ°€ function addMessage(type, content) { const chatMessages = document.getElementById('chatMessages'); const messageDiv = document.createElement('div'); messageDiv.className = `message ${type}`; if (type === 'user') { messageDiv.innerHTML = `You: ${content}`; } else { messageDiv.innerHTML = `✨ Gemini:
${content.replace(/\n/g, '
')}`; } chatMessages.appendChild(messageDiv); chatMessages.scrollTop = chatMessages.scrollHeight; } // Gemini에 λ©”μ‹œμ§€ 전솑 async function sendToGemini() { const input = document.getElementById('geminiInput'); const message = input.value.trim(); if (!message) return; addMessage('user', message); input.value = ''; const loadingMsg = document.createElement('div'); loadingMsg.className = 'message assistant'; loadingMsg.innerHTML = '✨ Gemini:
Thinking...'; loadingMsg.id = 'loading-message'; document.getElementById('chatMessages').appendChild(loadingMsg); try { const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${aiModalState.apiKey}`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: `Context: User is using a Pill Identifier tool on WIA Pin Code platform. This tool helps identify medications by imprint code, color, shape, and size. User question: ${message} IMPORTANT: Always remind user that this is educational information only and they should: 1. Never take unidentified pills 2. Consult healthcare providers for medical advice 3. Contact poison control if emergency 4. Take unknown pills to pharmacist for professional identification` }] }], generationConfig: { temperature: 0.7, maxOutputTokens: 1000 } }) }); const data = await response.json(); document.getElementById('loading-message').remove(); if (data.candidates && data.candidates[0] && data.candidates[0].content) { const reply = data.candidates[0].content.parts[0].text; addMessage('assistant', reply); } else { addMessage('assistant', 'Sorry, I could not generate a response. Please try again.'); } } catch (error) { document.getElementById('loading-message')?.remove(); if (error.message.includes('API key')) { addMessage('error', 'Invalid API key. Please check your API key and try again.'); showAPIKeySetup(); } else { addMessage('error', 'Failed to connect to Gemini. Please check your internet connection and try again.'); } } } // ========== EVENT LISTENERS ========== document.addEventListener('DOMContentLoaded', function() { const imprintInput = document.getElementById('imprintCode'); // μ—”ν„° ν‚€ 처리 imprintInput.addEventListener('keypress', function(e) { if (e.key === 'Enter') { identifyPill(); } }); // μž…λ ₯μ‹œ μ—λŸ¬ 클리어 imprintInput.addEventListener('input', clearErrors); // μž„ν”„λ¦°νŠΈ μ½”λ“œ μžλ™ λŒ€λ¬Έμž λ³€ν™˜ imprintInput.addEventListener('input', function(e) { e.target.value = e.target.value.toUpperCase(); }); // AI λ²„νŠΌ 이벀트 document.getElementById('aiBtn').addEventListener('click', openAIModal); // λͺ¨λ‹¬ μ™ΈλΆ€ ν΄λ¦­μ‹œ λ‹«κΈ° document.getElementById('aiModal').addEventListener('click', function(e) { if (e.target === this) { closeAIModal(); } }); // ν‚€λ³΄λ“œ 이벀트 document.addEventListener('keydown', function(e) { if (e.key === 'Enter') { const geminiInput = document.getElementById('geminiInput'); if (document.activeElement === geminiInput) { sendToGemini(); } } if (e.key === 'Escape') { closeAIModal(); } }); updateAPIKeyStatus(); updateCurrentYear(); updateToolCount(); }); // ========== DYNAMIC TOOL COUNT ========== async function updateToolCount() { try { const response = await fetch('/api/tool-count.php'); const data = await response.json(); document.querySelectorAll('.dynamic-tools-count').forEach(el => { el.textContent = `${data.count}+ free online tools in 211 languages. No signup, no fees, just tools that work.`; }); document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${data.count}+ ${suffix}`; }); } catch (error) { const fallbackCount = 333; document.querySelectorAll('.dynamic-tools-count').forEach(el => { el.textContent = `${fallbackCount}+ free online tools in 211 languages. No signup, no fees, just tools that work.`; }); document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${fallbackCount}+ ${suffix}`; }); } } function updateCurrentYear() { const currentYear = new Date().getFullYear(); document.querySelectorAll('.current-year').forEach(el => { el.textContent = currentYear; }); } // ========== ANALYTICS ========== window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXXXX'); trackEvent('page_view', { tool: TOOL_CONFIG.name, category: TOOL_CONFIG.category });