MM to Inches

Bidirectional mm ↔ inches Converter

Bidirectional Length Converter

Switch between Millimeters ↔ Inches

mm
in
0 mm = 0 in
1 millimeter = 0.0393701 inches
1 inch = 25.4 millimeters

Conversion History

    document.addEventListener('DOMContentLoaded', function() { // DOM Elements const inputValue = document.getElementById('input-value'); const outputValue = document.getElementById('output-value'); const inputUnit = document.getElementById('input-unit'); const outputUnit = document.getElementById('output-unit'); const toggleBtn = document.getElementById('toggle-btn'); const toggleLabel = document.getElementById('toggle-label'); const convertBtn = document.getElementById('convert-btn'); const resetBtn = document.getElementById('reset-btn'); const resultValue = document.getElementById('result-value'); const historyList = document.getElementById('history-list'); const clearHistoryBtn = document.getElementById('clear-history'); // State let isMmToIn = true; // Default: mm → in let conversionHistory = JSON.parse(localStorage.getItem('conversionHistory')) || []; // Initialize renderHistory(); updateUnits(); // Toggle Conversion Direction toggleBtn.addEventListener('click', function() { isMmToIn = !isMmToIn; updateUnits(); convert(); }); // Update Unit Labels function updateUnits() { if (isMmToIn) { inputUnit.textContent = "mm"; outputUnit.textContent = "in"; toggleLabel.textContent = "Millimeters to Inches"; } else { inputUnit.textContent = "in"; outputUnit.textContent = "mm"; toggleLabel.textContent = "Inches to Millimeters"; } } // Conversion Logic function convert() { const input = parseFloat(inputValue.value); if (isNaN(input)) { outputValue.value = ""; return; } let result; if (isMmToIn) { result = input / 25.4; // mm → in resultValue.textContent = `${input} mm = ${result.toFixed(6)} in`; } else { result = input * 25.4; // in → mm resultValue.textContent = `${input} in = ${result.toFixed(6)} mm`; } outputValue.value = result.toFixed(6); addToHistory(input, result); } // Add to History function addToHistory(input, output) { const timestamp = new Date().toLocaleString(); const conversion = { input: input, output: output, isMmToIn: isMmToIn, date: timestamp }; conversionHistory.unshift(conversion); if (conversionHistory.length > 10) { conversionHistory = conversionHistory.slice(0, 10); } localStorage.setItem('conversionHistory', JSON.stringify(conversionHistory)); renderHistory(); } // Render History function renderHistory() { historyList.innerHTML = ''; if (conversionHistory.length === 0) { const emptyItem = document.createElement('li'); emptyItem.className = 'history-item'; emptyItem.textContent = 'No conversions yet'; historyList.appendChild(emptyItem); return; } conversionHistory.forEach(item => { const historyItem = document.createElement('li'); historyItem.className = 'history-item'; let conversionText; if (item.isMmToIn) { conversionText = `${item.input} mm → ${item.output.toFixed(4)} in`; } else { conversionText = `${item.input} in → ${item.output.toFixed(4)} mm`; } const dateText = document.createElement('span'); dateText.textContent = item.date; dateText.style.color = '#5f6368'; dateText.style.fontSize = '0.8rem'; historyItem.innerHTML = `${conversionText}`; historyItem.appendChild(dateText); historyList.appendChild(historyItem); }); } // Clear History clearHistoryBtn.addEventListener('click', function() { conversionHistory = []; localStorage.removeItem('conversionHistory'); renderHistory(); }); // Reset Converter resetBtn.addEventListener('click', function() { inputValue.value = ""; outputValue.value = ""; }); // Auto-convert on input change inputValue.addEventListener('input', convert); });
    Page View Counter
    Page Views: 0
    // Page View Counter Script document.addEventListener('DOMContentLoaded', function () { // Check if localStorage is supported if (typeof(Storage) !== "undefined") { // Get the current view count from localStorage let viewCount = localStorage.getItem('pageViewCount'); // If no count exists, initialize it to 0 if (viewCount === null) { viewCount = 0; } else { viewCount = parseInt(viewCount, 10); } // Increment the view count viewCount++; // Save the updated count back to localStorage localStorage.setItem('pageViewCount', viewCount); // Display the updated count on the page document.getElementById('viewCount').textContent = viewCount; } else { // If localStorage is not supported, display an error message document.getElementById('pageViewCounter').textContent = "Page view counter not supported."; } });

    Copyright 2025 mm2in.com

    Terms of Service & Privacy Policy - mm2in.com

    Terms of Service & Privacy Policy

    Last Updated: 04/2025

    1. Terms of Service

    Welcome to mm2in.com (the "Website"). By using our metric-to-imperial conversion tool, you agree to these terms:

    1.1 Use of the Calculator

    • The conversion tool provides mathematical calculations only and should not be used for critical measurements (e.g., engineering, medical, or construction applications).
    • You must be at least 13 years old to use this Website.
    • Conversions are rounded for practicality. For precise measurements, verify results with professional tools.

    1.2 Disclaimer

    The Website is provided "as is." While we strive for accuracy, we do not guarantee error-free conversions and are not liable for any consequences of using the results.

    1.3 Intellectual Property

    All content (including conversion algorithms, design, and branding) is owned by mm2in.com. Unauthorized commercial use or redistribution of the calculator is prohibited.

    1.4 Changes to Terms

    We may update these Terms periodically. Continued use after changes constitutes acceptance.

    2. Privacy Policy

    We prioritize your privacy. Here's our data handling policy:

    2.1 Data Collection

    • No Personal Data: The calculator does not require accounts or store personal identifiers.
    • Calculation Inputs: Your millimeter/inch values are processed in real-time and never stored on our servers.
    • Analytics Data: We collect anonymized usage statistics (e.g., browser type, conversion frequency) via cookies or tools like Google Analytics.

    2.2 How We Use Data

    • To improve conversion accuracy and user experience.
    • To analyze popular conversion types (e.g., mm-to-in vs. in-to-mm).
    • We do not sell, share, or monetize user data.

    2.3 Cookies

    The Website uses minimal cookies for:

    • Remembering user preferences (e.g., default conversion direction).
    • Anonymous traffic analysis (via Google Analytics).

    2.4 Third-Party Services

    We use:

    • Analytics: Google Analytics (anonymous data only).
    • Hosting: Carrd or similar platforms.

    2.5 Children's Privacy

    This Website complies with COPPA and does not knowingly collect data from children under 13.

    3. Contact Us

    For questions about these policies, email: [email protected].

    Copyright 2025 mm2in.com