{"id":65453,"date":"2026-09-28T19:40:09","date_gmt":"2026-09-28T16:40:09","guid":{"rendered":"https:\/\/wpcalc.com\/en\/?p=65453"},"modified":"2026-09-29T15:19:24","modified_gmt":"2026-09-29T12:19:24","slug":"unix-timestamp-converter","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/web-tools\/unix-timestamp-converter\/","title":{"rendered":"Unix Timestamp Converter"},"content":{"rendered":"<section class=\"not-prose calculator-box\" aria-labelledby=\"calculator-title\"><div class=\"flex items-baseline sm:items-center justify-between gap-2 sm:gap-3\"><div class=\"flex flex-col sm:flex-row sm:items-center gap-2\"><span class=\"icon icon-calculator text-primary-700! text-base! dark:text-primary-300!\" aria-hidden=\"true\"><\/span><h2 id=\"calculator-title\" class=\"text-lg font-display font-bold\">Convert Unix Timestamps<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"65453\" data-favorite-title=\"Unix Timestamp\" data-favorite-url=\"https:\/\/wpcalc.com\/en\/web-tools\/unix-timestamp-converter\/\" data-favorite-excerpt=\"Convert a Unix timestamp (epoch time) into a human-readable date and time in local and UTC, or turn any date and time into a Unix timestamp in seconds or milliseconds.\" aria-label=\"Add to Favorites\" data-favorite-icon=\"icon icon-conversion\">\n    <span class=\"icon icon-shape-star-empty\" aria-hidden=\"true\"><\/span>\n  <\/button>\n  <div class=\"calcdash-favorite__tip\" aria-hidden=\"true\">\n   <span class=\"favorite-tooltip\" id=\"favorite-tooltip\"><\/span>\n  <\/div>\n  <span class=\"sr-only\" role=\"status\" id=\"favorite-status\"><\/span>\n<\/div><\/div><form action=\"https:\/\/wpcalc.com\/en\/web-tools\/unix-timestamp-converter\/\" method=\"POST\" class=\"calculator\" id=\"calculator-65453\" data-post=\"65453\"><fieldset class=\"fieldset-input is-1\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"field\" id=\"input-1\"><label for=\"field-1\">Conversion Direction<\/label><div class=\"grid grid-cols-1\"><select id=\"field-1\" name=\"conversion_direction\"><option value=\"ts2date\" selected>Timestamp \u2192 Date &amp; Time<\/option><option value=\"date2ts\">Date &amp; Time \u2192 Timestamp<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"field has-term\" id=\"input-2\"><label for=\"field-2\">Unix Timestamp<\/label><div class=\"term\">t<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><div class=\"field-group\"><input type=\"number\" name=\"unix_timestamp\" id=\"field-2\" aria-describedby=\"calc-info-2\" placeholder=\"e.g. 1735689600\" step=\"1\" value=\"1735689600\"\/><div class=\"grid grid-cols-1\"><select id=\"field-3\" name=\"unit\" aria-label=\"Unit\"><option value=\"s\" selected>Seconds<\/option><option value=\"ms\">Milliseconds<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><small id=\"calc-info-2\">Seconds (or milliseconds) since Jan 1, 1970 00:00:00 UTC. Negative values are allowed for dates before 1970.<\/small><\/div><div class=\"field\" id=\"input-3\" hidden><label for=\"field-4\">Date<\/label><input type=\"date\" name=\"date\" id=\"field-4\" aria-describedby=\"calc-info-4\" step=\"any\" value=\"2025-06-15\"\/><small id=\"calc-info-4\">Used only for the Date &amp; Time \u2192 Timestamp direction.<\/small><\/div><div class=\"field\" id=\"input-4\" hidden><label for=\"field-5\">Time<\/label><input type=\"time\" name=\"time\" id=\"field-5\" aria-describedby=\"calc-info-5\" step=\"any\" value=\"12:30\"\/><small id=\"calc-info-5\">Interpreted in your local time zone. Seconds are optional.<\/small><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"65453\">Calculate<\/button><button type=\"reset\">Reset<\/button><\/div><div class=\"field is-checkbox hidden!\" id=\"field-auto-calc\"><input type=\"checkbox\" id=\"auto-calc\"><label for=\"auto-calc\">Calculate automatically<\/label><small>If enabled, the result will update automatically when you change any value.<\/small><\/div><div class=\"fieldset-result is-hidden\" aria-labelledby=\"result-title\" aria-live=\"polite\" role=\"region\"> <h3 class=\"result-title bg-gradient-to-r from-primary-50 to-gray-50 dark:from-primary-900 dark:to-gray-800\" id=\"result-title\"><span class=\"icon icon-s-pulse\" aria-hidden=\"true\"><\/span> Conversion Results<\/h3><div class=\"result-box\"><div class=\"field-result is-column\" id=\"output-1\"><span class=\"field-title\"><span>Local Date &amp; Time<\/span><\/span><span class=\"field-value\" id=\"result-1\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-2\"><span class=\"field-title\"><span>UTC Date &amp; Time<\/span><\/span><span class=\"field-value\" id=\"result-2\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-3\"><span class=\"field-title\"><span>Timestamp (seconds)<\/span><span class=\"result-term\">t<\/span><\/span><span class=\"field-value\" id=\"result-3\" data-unit=\"s\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-4\"><span class=\"field-title\"><span>Timestamp (milliseconds)<\/span><\/span><span class=\"field-value\" id=\"result-4\" data-unit=\"ms\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-5\"><span class=\"field-title\"><span>ISO 8601 &amp; Relative<\/span><\/span><span class=\"field-value\" id=\"result-5\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><\/div><div class=\"result-actions\"><button type=\"button\" class=\"copy-link\"><svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z\"\/><path d=\"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z\"\/><\/svg><span class=\"copy-link__text\">Copy link to this calculation<\/span><\/button><span class=\"sr-only\" role=\"status\" id=\"copy-link-status\"><\/span><\/div><\/div><a href=\"#respond\" class=\"hidden transition-opacity duration-300 opacity-0 w-50 text-sm justify-center items-center gap-2 px-4 py-2 rounded bg-gray-200 text-gray-700 hover:bg-gray-300\" id=\"leave-comment\"><span class=\"icon icon-comments\" aria-hidden=\"true\"><\/span>Leave a Comment<\/a><\/form><\/section><section id=\"calc-reactions\" class=\"not-prose hidden my-12 bg-gradient-to-r from-primary-50 to-gray-50 border border-indigo-100 rounded-xl px-6 py-4 shadow-sm\" data-post=\"65453\" aria-live=\"polite\" aria-labelledby=\"calc-reactions-title\"><p id=\"calc-reactions-title\" class=\"text-sm text-gray-500 text-center mb-2\">How did this result make you feel?<\/p><div role=\"group\" aria-labelledby=\"calc-reactions-title\" class=\"grid grid-cols-3 sm:flex sm:flex-row sm:justify-around gap-4 sm:items-center sm:flex-wrap\"><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"like\"><span class=\"reaction-count\" data-reaction-count=\"like\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude00 <\/span><span class=\"reaction-description font-medium\">Like <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"helpful\"><span class=\"reaction-count\" data-reaction-count=\"helpful\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\udca1 <\/span><span class=\"reaction-description font-medium\">Helpful <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"confused\"><span class=\"reaction-count\" data-reaction-count=\"confused\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude15 <\/span><span class=\"reaction-description font-medium\">Confused <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"disappointed\"><span class=\"reaction-count\" data-reaction-count=\"disappointed\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude1e <\/span><span class=\"reaction-description font-medium\">Disappointed <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"inaccurate\"><span class=\"reaction-count\" data-reaction-count=\"inaccurate\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\u274c <\/span><span class=\"reaction-description font-medium\">Inaccurate <\/span><\/button><\/div><div id=\"reaction-message\" class=\"hidden mt-8 rounded-md border border-primary-100 bg-white\/50 backdrop-blur-sm px-4 py-2 text-sm text-center shadow-sm\"><\/div><\/section><div class=\"calcdash-ad not-prose calcdash-ad--calc_result calcdash-ad--in-article\"><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-1721569815777345\" data-ad-slot=\"6317458308\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/div>\n<style id=\"wpcoderpro-inline-1\">.formula-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section class=\"formula-box\" aria-labelledby=\"formula-title\">\r\n\t<div id=\"formula-title\" class=\"not-prose font-display mb-4\"><span class=\"icon icon-formula\" aria-hidden=\"true\"><\/span><h2>Unix Timestamp Formula<\/h2><\/div>\r\n\t<figure class=\"not-prose formula\">\r\n\t\t<figcaption class=\"formula-title\">Formula<\/figcaption>\r\n\t\t<div class=\"text-base text-gray-800\" id=\"formula\">\n\\[ t = \\left\\lfloor \\frac{ms}{1000} \\right\\rfloor \\]\n\\[ \\text{Date} = 1970\\text{-}01\\text{-}01\\ 00{:}00{:}00\\ \\text{UTC} + t \\ \\text{seconds} \\]\n\\[ t_{\\text{local}} = t_{\\text{UTC}} + t_{\\text{offset}} \\]\n<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(t\\) \u2014 the Unix timestamp, i.e. the number of whole seconds elapsed since the epoch (Jan 1, 1970 00:00:00 UTC)<\/li>\n<li>\\(ms\\) \u2014 the same value expressed in milliseconds<\/li>\n<li>\\(t_{\\text{offset}}\\) \u2014 the time zone offset of your location relative to UTC, in seconds<\/li>\n<\/ul>\n<p>The first line converts a millisecond timestamp to seconds; the second defines what a timestamp means \u2014 a simple count of seconds added to the epoch; the third shifts the UTC time into your local time zone.<\/p>\n<p>\r\n<\/section>\n<style id=\"wpcoderpro-inline-459\">.calculation-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section id=\"calculation\" class=\"calculation-box\" aria-labelledby=\"calculation-title\">\r\n\t<div id=\"calculation-title\" class=\"not-prose font-display\"><span class=\"icon icon-unordered-list\" aria-hidden=\"true\"><\/span><h2>Unix Timestamp \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<\/p>\n<p><strong>Example:<\/strong> convert the timestamp <code>1735689600<\/code> (seconds) into a date.<\/p>\n<p>\\[ 1735689600 \\div 86400 = 20089 \\ \\text{whole days} \\]<\/p>\n<p>20089 full days after 1970-01-01 lands exactly on 2025-01-01, with 0 seconds left over, so the time is midnight:<\/p>\n<p><strong>Result:<\/strong> 2025-01-01 00:00:00 UTC. In your local time zone the clock reads midnight plus your UTC offset (e.g. 2025-01-01 01:00:00 for UTC+1). In milliseconds the same moment is 1735689600000 ms.<\/p>\n<p>\n\r\n<\/section>\n<h2>How to Use the Calculator<\/h2>\n<ol>\n<li>Open <strong>Conversion Direction<\/strong> and choose either <em>Timestamp \u2192 Date &amp; Time<\/em> or <em>Date &amp; Time \u2192 Timestamp<\/em>; the input fields switch automatically.<\/li>\n<li>For a timestamp conversion, type the number into <strong>Unix Timestamp<\/strong> and pick <em>Seconds<\/em> or <em>Milliseconds<\/em> in the <strong>Unit<\/strong> box. Negative values work for dates before 1970.<\/li>\n<li>For the reverse direction, set the <strong>Date<\/strong> and, optionally, the <strong>Time<\/strong> (leave time empty for midnight). The values are interpreted in your local time zone.<\/li>\n<li>Read the results: <strong>Local Date &amp; Time<\/strong> with your UTC offset, <strong>UTC Date &amp; Time<\/strong>, the timestamp in both <strong>seconds<\/strong> and <strong>milliseconds<\/strong>, and the <strong>ISO 8601 &amp; Relative<\/strong> line, which also shows the day of year and weekday.<\/li>\n<\/ol>\n<h2>What Is a Unix Timestamp?<\/h2>\n<p>A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have passed since <strong>1 January 1970, 00:00:00 UTC<\/strong> \u2014 the \u201cUnix epoch\u201d. Instead of storing a date as separate year, month, day and time-zone fields, computers store a single integer that grows by 1 every second. The timestamp 0 is the epoch itself; 1735689600 is exactly 55 years later, and negative timestamps count backwards to dates before 1970.<\/p>\n<p>This representation is popular because it is compact, easy to compare and completely free of time-zone ambiguity. Sorting events, measuring durations or checking \u201cwas A before B?\u201d becomes simple integer arithmetic. You will find Unix timestamps in databases, log files, APIs (e.g. JavaScript\u2019s <code>Date.now()<\/code>, which returns milliseconds), cron jobs, and webhooks.<\/p>\n<p>When interpreting a result, remember the distinction between UTC and local time. A timestamp always refers to one absolute moment, but the clock reading depends on the viewer\u2019s offset. This calculator shows both: the UTC date and time, which never changes, and your local date and time, which the browser derives from your device\u2019s time zone. The <strong>ISO 8601<\/strong> string (<code>2025-01-01T00:00:00.000Z<\/code>) is the UTC form, ending in <code>Z<\/code> for \u201cZulu time\u201d.<\/p>\n<p>The <strong>Relative<\/strong> line gives a quick human sense of scale \u2014 \u201cabout 6 months ago\u201d or \u201cin 3 days\u201d \u2014 which is handy when reading logs from systems whose clock you don\u2019t know, or when a timestamp comes from a header such as an HTTP <code>Date<\/code> field.<\/p>\n<h2>Assumptions, Limitations and Tips<\/h2>\n<ul>\n<li><strong>Seconds vs milliseconds:<\/strong> many systems (JavaScript, Java) use milliseconds, while Unix tools and most APIs use seconds. If your number is 13 digits long it is almost certainly milliseconds; 10 digits usually means seconds. A common bug is treating one for the other, which shifts the date by about 31,700 years.<\/li>\n<li><strong>Local time zone:<\/strong> in the Date &amp; Time \u2192 Timestamp direction, the calculator interprets your input in the time zone configured on your device. If you need a timestamp for a specific UTC moment, convert your local time to UTC first (e.g. subtract your offset).<\/li>\n<li><strong>Negative timestamps:<\/strong> dates before 1970 are represented with negative numbers; the calculator handles them, but some older systems do not.<\/li>\n<li><strong>Leap seconds:<\/strong> standard Unix time ignores leap seconds \u2014 every day is exactly 86,400 seconds. This matches how virtually all software behaves, so no adjustment is needed for everyday use.<\/li>\n<li><strong>Range:<\/strong> JavaScript (and therefore this calculator) supports roughly \u00b1273,000 years around 1970, which is far beyond any practical date.<\/li>\n<li><strong>Quick sanity check:<\/strong> 1,000,000,000 seconds \u2248 2001-09-09; 1,732,000,000 \u2248 November 2024. Memorising one or two milestones makes it easy to spot a misplaced digit.<\/li>\n<\/ul>\n<h2>Related Tools<\/h2>\n<p>Working with raw data often involves other encodings too. If your timestamp is embedded in a larger payload, try the <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/json-formatter-validator\/\">JSON Formatter<\/a> to make it readable, the <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/hex-converter\/\">Hex Converter<\/a> or <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/binary-converter\/\">Binary Converter<\/a> to inspect numeric representations, and the <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/base64-decoder\/\">Base64 Decoder<\/a> to unpack encoded strings that frequently carry epoch values in URLs and API tokens.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Convert a Unix timestamp (epoch time) into a human-readable date and time in local and UTC, or turn any date and time into a Unix timestamp in seconds or milliseconds.<\/p>\n","protected":false},"author":3168,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[63],"tags":[64],"class_list":["post-65453","post","type-post","status-publish","format-standard","hentry","category-web-tools","tag-converter-tools"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/65453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/users\/3168"}],"replies":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/comments?post=65453"}],"version-history":[{"count":3,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/65453\/revisions"}],"predecessor-version":[{"id":65730,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/65453\/revisions\/65730"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=65453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=65453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=65453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}