{"id":1691,"date":"2025-08-10T08:27:02","date_gmt":"2025-08-10T08:27:02","guid":{"rendered":"https:\/\/donhit.com\/en\/?p=1691"},"modified":"2025-08-11T02:09:41","modified_gmt":"2025-08-11T02:09:41","slug":"pint-to-ml","status":"publish","type":"post","link":"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/","title":{"rendered":"Pint to mL Converter"},"content":{"rendered":"<p><center>    <div class=\"converter-wrapper\">\r\n        <div class=\"converter-main\">\r\n            <h1 class=\"converter-title\">Volume Converter<\/h1>\r\n            <p class=\"converter-subtitle\">Convert between Pints and Milliliters<\/p>\r\n            \r\n            <div class=\"input-group\">\r\n                <label class=\"input-label\" for=\"input1\" id=\"label1\">US Pints<\/label>\r\n                <div style=\"position: relative;\">\r\n                    <input type=\"number\" id=\"input1\" class=\"input-field\" placeholder=\"Enter pints...\" step=\"any\" min=\"0\">\r\n                    <span class=\"unit-label\" id=\"unit1\">PT<\/span>\r\n                <\/div>\r\n            <\/div>\r\n\r\n            <div class=\"swap-icon\">\r\n                <button class=\"swap-button\" onclick=\"swapUnits()\" title=\"Swap units\">\r\n                    <svg class=\"swap-arrow\" viewBox=\"0 0 24 24\">\r\n                        <path d=\"M7 14l5-5 5 5z\"\/>\r\n                        <path d=\"M7 10l5 5 5-5z\"\/>\r\n                    <\/svg>\r\n                <\/button>\r\n            <\/div>\r\n\r\n            <div class=\"input-group\">\r\n                <label class=\"input-label\" for=\"input2\" id=\"label2\">Milliliters<\/label>\r\n                <div style=\"position: relative;\">\r\n                    <input type=\"number\" id=\"input2\" class=\"input-field\" placeholder=\"Enter milliliters...\" step=\"any\" min=\"0\">\r\n                    <span class=\"unit-label\" id=\"unit2\">mL<\/span>\r\n                <\/div>\r\n            <\/div>\r\n\r\n            <div class=\"result-section\">\r\n                <div class=\"result-label\">Conversion Result<\/div>\r\n                <div class=\"result-value\" id=\"resultDisplay\">Enter a value to convert<\/div>\r\n            <\/div>\r\n\r\n            <div class=\"conversion-info\">\r\n                <div class=\"info-title\">\ud83d\udccf Conversion Factor<\/div>\r\n                <div class=\"info-text\">1 US Pint = 473.176 Milliliters<br>This converter uses the standard US liquid pint measurement.<\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <script>\r\n        const input1 = document.getElementById('input1');\r\n        const input2 = document.getElementById('input2');\r\n        const resultDisplay = document.getElementById('resultDisplay');\r\n        const label1 = document.getElementById('label1');\r\n        const label2 = document.getElementById('label2');\r\n        const unit1 = document.getElementById('unit1');\r\n        const unit2 = document.getElementById('unit2');\r\n        \r\n        \/\/ Conversion factor: 1 US Pint = 473.176 mL\r\n        const PINT_TO_ML = 473.176;\r\n        \r\n        let isPintFirst = true; \/\/ Track current mode\r\n        let isConverting = false; \/\/ Prevent infinite loops\r\n        \r\n        function formatNumber(num) {\r\n            if (num === 0) return '0';\r\n            if (Math.abs(num) < 0.001) return num.toExponential(2);\r\n            if (Math.abs(num) >= 1000000) return num.toExponential(2);\r\n            \r\n            \/\/ For regular numbers, show up to 6 significant digits\r\n            const str = num.toString();\r\n            if (str.includes('.')) {\r\n                const parts = str.split('.');\r\n                if (parts[1].length > 6) {\r\n                    return parseFloat(num.toFixed(6)).toString();\r\n                }\r\n            }\r\n            return str;\r\n        }\r\n        \r\n        function updateResult(value, fromUnit, toUnit) {\r\n            if (value && !isNaN(value) && value >= 0) {\r\n                resultDisplay.textContent = `${formatNumber(value)} ${fromUnit} = ${formatNumber(\r\n                    isPintFirst ? value * PINT_TO_ML : value \/ PINT_TO_ML\r\n                )} ${toUnit}`;\r\n                document.querySelector('.result-section').classList.add('pulse-animation');\r\n                setTimeout(() => {\r\n                    document.querySelector('.result-section').classList.remove('pulse-animation');\r\n                }, 500);\r\n            } else {\r\n                resultDisplay.textContent = 'Enter a value to convert';\r\n            }\r\n        }\r\n        \r\n        function convertPintToML(pints) {\r\n            if (isConverting) return;\r\n            isConverting = true;\r\n            \r\n            const ml = pints * PINT_TO_ML;\r\n            input2.value = pints ? formatNumber(ml) : '';\r\n            updateResult(pints, 'Pints', 'mL');\r\n            \r\n            isConverting = false;\r\n        }\r\n        \r\n        function convertMLToPint(ml) {\r\n            if (isConverting) return;\r\n            isConverting = true;\r\n            \r\n            const pints = ml \/ PINT_TO_ML;\r\n            input1.value = ml ? formatNumber(pints) : '';\r\n            updateResult(ml, 'mL', 'Pints');\r\n            \r\n            isConverting = false;\r\n        }\r\n        \r\n        function swapUnits() {\r\n            isPintFirst = !isPintFirst;\r\n            \r\n            \/\/ Swap labels and units\r\n            if (isPintFirst) {\r\n                label1.textContent = 'US Pints';\r\n                label2.textContent = 'Milliliters';\r\n                unit1.textContent = 'PT';\r\n                unit2.textContent = 'mL';\r\n                input1.placeholder = 'Enter pints...';\r\n                input2.placeholder = 'Enter milliliters...';\r\n            } else {\r\n                label1.textContent = 'Milliliters';\r\n                label2.textContent = 'US Pints';\r\n                unit1.textContent = 'mL';\r\n                unit2.textContent = 'PT';\r\n                input1.placeholder = 'Enter milliliters...';\r\n                input2.placeholder = 'Enter pints...';\r\n            }\r\n            \r\n            \/\/ Swap values\r\n            const temp = input1.value;\r\n            input1.value = input2.value;\r\n            input2.value = temp;\r\n            \r\n            \/\/ Update result if there's a value\r\n            const currentValue = parseFloat(input1.value);\r\n            if (currentValue && !isNaN(currentValue)) {\r\n                if (isPintFirst) {\r\n                    updateResult(currentValue, 'Pints', 'mL');\r\n                } else {\r\n                    updateResult(currentValue, 'mL', 'Pints');\r\n                }\r\n            }\r\n            \r\n            \/\/ Add animation to swap button\r\n            document.querySelector('.swap-button').style.transform = 'scale(0.9)';\r\n            setTimeout(() => {\r\n                document.querySelector('.swap-button').style.transform = '';\r\n            }, 150);\r\n        }\r\n        \r\n        \/\/ Event listeners\r\n        input1.addEventListener('input', function() {\r\n            const value = parseFloat(this.value);\r\n            if (isPintFirst) {\r\n                convertPintToML(value);\r\n            } else {\r\n                convertMLToPint(value);\r\n            }\r\n        });\r\n        \r\n        input2.addEventListener('input', function() {\r\n            const value = parseFloat(this.value);\r\n            if (isPintFirst) {\r\n                convertMLToPint(value);\r\n            } else {\r\n                convertPintToML(value);\r\n            }\r\n        });\r\n        \r\n        \/\/ Prevent negative values\r\n        [input1, input2].forEach(input => {\r\n            input.addEventListener('keydown', function(e) {\r\n                if (e.key === '-' || e.key === '+') {\r\n                    e.preventDefault();\r\n                }\r\n            });\r\n        });\r\n        \r\n        \/\/ Focus effect\r\n        [input1, input2].forEach(input => {\r\n            input.addEventListener('focus', function() {\r\n                this.parentElement.parentElement.style.transform = 'translateY(-2px)';\r\n            });\r\n            \r\n            input.addEventListener('blur', function() {\r\n                this.parentElement.parentElement.style.transform = '';\r\n            });\r\n        });\r\n    <\/script><\/center><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1691","post","type-post","status-publish","format-standard","hentry","category-convert"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Pint to mL Converter - DonHit<\/title>\n<meta name=\"description\" content=\"Easily convert pints to milliliters with our Pint to mL Converter. Quick, accurate results for US and UK pints to mL conversions in just seconds\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pint to mL Converter - DonHit\" \/>\n<meta property=\"og:description\" content=\"Easily convert pints to milliliters with our Pint to mL Converter. Quick, accurate results for US and UK pints to mL conversions in just seconds\" \/>\n<meta property=\"og:url\" content=\"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/\" \/>\n<meta property=\"og:site_name\" content=\"DonHit - World of Tools\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-10T08:27:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T02:09:41+00:00\" \/>\n<meta name=\"author\" content=\"DonHit\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DonHit\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pint to mL Converter - DonHit","description":"Easily convert pints to milliliters with our Pint to mL Converter. Quick, accurate results for US and UK pints to mL conversions in just seconds","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/","og_locale":"en_US","og_type":"article","og_title":"Pint to mL Converter - DonHit","og_description":"Easily convert pints to milliliters with our Pint to mL Converter. Quick, accurate results for US and UK pints to mL conversions in just seconds","og_url":"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/","og_site_name":"DonHit - World of Tools","article_published_time":"2025-08-10T08:27:02+00:00","article_modified_time":"2025-08-11T02:09:41+00:00","author":"DonHit","twitter_card":"summary_large_image","twitter_misc":{"Written by":"DonHit","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/#article","isPartOf":{"@id":"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/"},"author":{"name":"DonHit","@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"headline":"Pint to mL Converter","datePublished":"2025-08-10T08:27:02+00:00","dateModified":"2025-08-11T02:09:41+00:00","mainEntityOfPage":{"@id":"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/"},"wordCount":10,"commentCount":0,"publisher":{"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"articleSection":["Conversion Calculators"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/donhit.com\/en\/convert\/pint-to-ml\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/","url":"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/","name":"Pint to mL Converter - DonHit","isPartOf":{"@id":"https:\/\/donhit.com\/en\/#website"},"datePublished":"2025-08-10T08:27:02+00:00","dateModified":"2025-08-11T02:09:41+00:00","description":"Easily convert pints to milliliters with our Pint to mL Converter. Quick, accurate results for US and UK pints to mL conversions in just seconds","breadcrumb":{"@id":"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/donhit.com\/en\/convert\/pint-to-ml\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/donhit.com\/en\/convert\/pint-to-ml\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Trang ch\u1ee7","item":"https:\/\/donhit.com\/en\/"},{"@type":"ListItem","position":2,"name":"Conversion Calculators","item":"https:\/\/donhit.com\/en\/category\/convert\/"},{"@type":"ListItem","position":3,"name":"Pint to mL Converter"}]},{"@type":"WebSite","@id":"https:\/\/donhit.com\/en\/#website","url":"https:\/\/donhit.com\/en\/","name":"DonHit - World of tools","description":"","publisher":{"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/donhit.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/0c6ff7dcd8ba4810c56a532f09c33148","name":"DonHit","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/donhit.com\/en\/wp-content\/uploads\/2024\/11\/logo-donhit.webp","contentUrl":"https:\/\/donhit.com\/en\/wp-content\/uploads\/2024\/11\/logo-donhit.webp","width":400,"height":267,"caption":"DonHit"},"logo":{"@id":"https:\/\/donhit.com\/en\/#\/schema\/person\/image\/"},"description":"DonHit is a website designed to provide useful tools for everyone. Its primary goal is to support and empower the community. All the tools available on the site are completely free to use.","sameAs":["https:\/\/donhit.com\/en"],"url":"https:\/\/donhit.com\/en\/author\/admin_don\/"}]}},"_links":{"self":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/1691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/comments?post=1691"}],"version-history":[{"count":2,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/1691\/revisions"}],"predecessor-version":[{"id":2047,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/posts\/1691\/revisions\/2047"}],"wp:attachment":[{"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/media?parent=1691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/categories?post=1691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donhit.com\/en\/wp-json\/wp\/v2\/tags?post=1691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}