{"id":498,"date":"2026-08-06T15:11:18","date_gmt":"2026-08-06T13:11:18","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/?page_id=498"},"modified":"2026-08-06T16:16:59","modified_gmt":"2026-08-06T14:16:59","slug":"unix-epoch-timestamp-iso-date-converter","status":"publish","type":"page","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/unix-epoch-timestamp-iso-date-converter\/","title":{"rendered":"DateConverter &#8211; Unix Epoch Timestamp &#038; ISO"},"content":{"rendered":"<div id=\"epoch-tool-wrapper\" style=\"max-width: 100%; background: #1e293b; color: #f8fafc; padding: 28px; border-radius: 12px; font-family: system-ui, -apple-system, sans-serif; box-shadow: 0 4px 20px rgba(0,0,0,0.3); border: 1px solid #334155;\">\n<div style=\"display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #334155; padding-bottom: 12px; margin-bottom: 20px; flex-wrap: wrap; gap: 12px;\">\n<h3 style=\"margin: 0; color: #38bdf8; font-size: 1.25rem;\">Unix Epoch Timestamp &amp; ISO Date Converter<\/h3>\n<p>        <button id=\"epoch-set-now\" style=\"background: rgba(56, 189, 248, 0.15); border: 1px solid #38bdf8; color: #38bdf8; padding: 6px 14px; font-size: 0.85rem; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.2s;\">Set to Current Time<\/button>\n    <\/div>\n<p>    <!-- Inputs Grid --><\/p>\n<div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px;\">\n<div>\n            <label style=\"display: block; font-size: 0.875rem; margin-bottom: 8px; color: #cbd5e1; font-weight: 500;\">Unix Timestamp (Seconds or Milliseconds)<\/label><br \/>\n            <input type=\"text\" id=\"epoch-input\" placeholder=\"e.g. 1786111788\" style=\"width: 100%; padding: 12px; background: #0f172a; border: 1px solid #475569; color: #fff; border-radius: 8px; font-family: monospace; font-size: 1rem; box-sizing: border-box; outline: none;\"><\/p>\n<div id=\"epoch-unit-badge\" style=\"font-size: 0.75rem; color: #94a3b8; margin-top: 6px;\">Auto-detecting format&#8230;<\/div>\n<\/p><\/div>\n<div>\n            <label style=\"display: block; font-size: 0.875rem; margin-bottom: 8px; color: #cbd5e1; font-weight: 500;\">ISO 8601 UTC Date (YYYY-MM-DDTHH:mm:ss.sssZ)<\/label><br \/>\n            <input type=\"text\" id=\"iso-input\" placeholder=\"e.g. 2026-08-06T14:09:48.000Z\" style=\"width: 100%; padding: 12px; background: #0f172a; border: 1px solid #475569; color: #fff; border-radius: 8px; font-family: monospace; font-size: 1rem; box-sizing: border-box; outline: none;\"><\/p>\n<div style=\"font-size: 0.75rem; color: #94a3b8; margin-top: 6px;\">Standard format for analytics APIs &amp; cookies<\/div>\n<\/p><\/div>\n<\/p><\/div>\n<p>    <!-- Ready-to-use Formats --><\/p>\n<div style=\"display: flex; flex-direction: column; gap: 14px;\">\n        <label style=\"font-size: 0.813rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;\">System Ready-To-Use Formats<\/label><\/p>\n<p>        <!-- BigQuery Timestamp --><\/p>\n<div>\n<div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;\">\n                <label style=\"font-size: 0.75rem; color: #cbd5e1; font-weight: 600;\">BigQuery \/ Server-Side SQL (UTC)<\/label><br \/>\n                <button onclick=\"copyEpochText('out-bq', this)\" style=\"background: rgba(71, 85, 105, 0.4); border: 1px solid #475569; color: #cbd5e1; padding: 3px 10px; font-size: 0.75rem; border-radius: 4px; cursor: pointer;\">Copy<\/button>\n            <\/div>\n<p>            <input type=\"text\" id=\"out-bq\" readonly=\"\" style=\"width: 100%; padding: 10px 12px; background: #0f172a; border: 1px solid #334155; color: #38bdf8; font-family: monospace; font-size: 0.9rem; border-radius: 6px; box-sizing: border-box;\">\n        <\/div>\n<p>        <!-- MySQL Datetime --><\/p>\n<div>\n<div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;\">\n                <label style=\"font-size: 0.75rem; color: #cbd5e1; font-weight: 600;\">MySQL DATETIME \/ GA4 Event Format (YYYY-MM-DD HH:MM:SS)<\/label><br \/>\n                <button onclick=\"copyEpochText('out-mysql', this)\" style=\"background: rgba(71, 85, 105, 0.4); border: 1px solid #475569; color: #cbd5e1; padding: 3px 10px; font-size: 0.75rem; border-radius: 4px; cursor: pointer;\">Copy<\/button>\n            <\/div>\n<p>            <input type=\"text\" id=\"out-mysql\" readonly=\"\" style=\"width: 100%; padding: 10px 12px; background: #0f172a; border: 1px solid #334155; color: #38bdf8; font-family: monospace; font-size: 0.9rem; border-radius: 6px; box-sizing: border-box;\">\n        <\/div>\n<p>        <!-- Local Browser Date --><\/p>\n<div>\n<div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;\">\n                <label style=\"font-size: 0.75rem; color: #cbd5e1; font-weight: 600;\">Local Browser Time<\/label><br \/>\n                <button onclick=\"copyEpochText('out-local', this)\" style=\"background: rgba(71, 85, 105, 0.4); border: 1px solid #475569; color: #cbd5e1; padding: 3px 10px; font-size: 0.75rem; border-radius: 4px; cursor: pointer;\">Copy<\/button>\n            <\/div>\n<p>            <input type=\"text\" id=\"out-local\" readonly=\"\" style=\"width: 100%; padding: 10px 12px; background: #0f172a; border: 1px solid #334155; color: #94a3b8; font-family: monospace; font-size: 0.9rem; border-radius: 6px; box-sizing: border-box;\">\n        <\/div>\n<\/p><\/div>\n<\/div>\n<p><script>\nfunction updateEpochOutputs(dateObj) {\n    if (isNaN(dateObj.getTime())) return;<\/p>\n<p>    const ms = dateObj.getTime();\n    const sec = Math.floor(ms \/ 1000);<\/p>\n<p>    \/\/ Formats\n    const isoString = dateObj.toISOString();\n    const bqString = `TIMESTAMP_MILLIS(${ms})`;<\/p>\n<p>    \/\/ MySQL YYYY-MM-DD HH:MM:SS UTC\n    const pad = (n) => String(n).padStart(2, '0');\n    const mysqlString = `${dateObj.getUTCFullYear()}-${pad(dateObj.getUTCMonth()+1)}-${pad(dateObj.getUTCDate())} ${pad(dateObj.getUTCHours())}:${pad(dateObj.getUTCMinutes())}:${pad(dateObj.getUTCSeconds())}`;<\/p>\n<p>    document.getElementById('out-bq').value = bqString;\n    document.getElementById('out-mysql').value = mysqlString;\n    document.getElementById('out-local').value = dateObj.toString();\n}<\/p>\n<p>document.getElementById('epoch-input').addEventListener('input', function() {\n    const val = this.value.trim();\n    if (!val || isNaN(val)) return;<\/p>\n<p>    let ms = parseInt(val, 10);\n    \/\/ Detect sec vs ms\n    if (val.length <= 11) {\n        ms = ms * 1000;\n        document.getElementById('epoch-unit-badge').innerText = 'Detected unit: Seconds (s)';\n    } else {\n        document.getElementById('epoch-unit-badge').innerText = 'Detected unit: Milliseconds (ms)';\n    }\n\n    const d = new Date(ms);\n    if (!isNaN(d.getTime())) {\n        document.getElementById('iso-input').value = d.toISOString();\n        updateEpochOutputs(d);\n    }\n});\n\ndocument.getElementById('iso-input').addEventListener('input', function() {\n    const val = this.value.trim();\n    const d = new Date(val);\n    if (!isNaN(d.getTime())) {\n        document.getElementById('epoch-input').value = Math.floor(d.getTime() \/ 1000);\n        document.getElementById('epoch-unit-badge').innerText = 'Detected unit: Seconds (s)';\n        updateEpochOutputs(d);\n    }\n});\n\ndocument.getElementById('epoch-set-now').addEventListener('click', function() {\n    const now = new Date();\n    document.getElementById('epoch-input').value = Math.floor(now.getTime() \/ 1000);\n    document.getElementById('iso-input').value = now.toISOString();\n    document.getElementById('epoch-unit-badge').innerText = 'Detected unit: Seconds (s)';\n    updateEpochOutputs(now);\n});\n\nfunction copyEpochText(id, btn) {\n    const field = document.getElementById(id);\n    if (!field.value) return;\n    navigator.clipboard.writeText(field.value).then(() => {\n        const originalText = btn.innerText;\n        btn.innerText = 'Copied!';\n        btn.style.color = '#38bdf8';\n        btn.style.borderColor = '#38bdf8';\n        setTimeout(() => {\n            btn.innerText = originalText;\n            btn.style.color = '#cbd5e1';\n            btn.style.borderColor = '#475569';\n        }, 1500);\n    });\n}<\/p>\n<p>\/\/ Initial default to Now\ndocument.getElementById('epoch-set-now').click();\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bidirectional epoch timestamp and ISO 8601 date converter for server logs, BigQuery, and tracking APIs.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":38,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-tool-base.php","meta":{"footnotes":""},"class_list":["post-498","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>DateConverter - Unix Epoch Timestamp &amp; ISO - Lukas Wojcik - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/unix-epoch-timestamp-iso-date-converter\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DateConverter - Unix Epoch Timestamp &amp; ISO - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"Bidirectional epoch timestamp and ISO 8601 date converter for server logs, BigQuery, and tracking APIs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/unix-epoch-timestamp-iso-date-converter\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-06T14:16:59+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/unix-epoch-timestamp-iso-date-converter\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/unix-epoch-timestamp-iso-date-converter\\\/\",\"name\":\"DateConverter - Unix Epoch Timestamp & ISO - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"datePublished\":\"2026-08-06T13:11:18+00:00\",\"dateModified\":\"2026-08-06T14:16:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/unix-epoch-timestamp-iso-date-converter\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/unix-epoch-timestamp-iso-date-converter\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/unix-epoch-timestamp-iso-date-converter\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Toolbox\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"DateConverter &#8211; Unix Epoch Timestamp &#038; ISO\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"luky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"luky\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DateConverter - Unix Epoch Timestamp & ISO - Lukas Wojcik - Blog","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:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/unix-epoch-timestamp-iso-date-converter\/","og_locale":"en_US","og_type":"article","og_title":"DateConverter - Unix Epoch Timestamp & ISO - Lukas Wojcik - Blog","og_description":"Bidirectional epoch timestamp and ISO 8601 date converter for server logs, BigQuery, and tracking APIs.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/unix-epoch-timestamp-iso-date-converter\/","og_site_name":"Lukas Wojcik - Blog","article_modified_time":"2026-08-06T14:16:59+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/unix-epoch-timestamp-iso-date-converter\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/unix-epoch-timestamp-iso-date-converter\/","name":"DateConverter - Unix Epoch Timestamp & ISO - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"datePublished":"2026-08-06T13:11:18+00:00","dateModified":"2026-08-06T14:16:59+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/unix-epoch-timestamp-iso-date-converter\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/unix-epoch-timestamp-iso-date-converter\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/unix-epoch-timestamp-iso-date-converter\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Toolbox","item":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/"},{"@type":"ListItem","position":3,"name":"DateConverter &#8211; Unix Epoch Timestamp &#038; ISO"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"luky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"luky"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=498"}],"version-history":[{"count":2,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/498\/revisions"}],"predecessor-version":[{"id":8941,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/498\/revisions\/8941"}],"up":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/38"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}