Free · No signup · Runs in your browser

Unix Timestamp Converter
Epoch time, made readable.

Paste any unix timestamp and see the date in UTC, your local time, ISO 8601, SQL and more. Seconds, milliseconds, microseconds and nanoseconds are detected from the digit count, and nothing you paste ever leaves your browser.

No signup100% in-browserCopy every formatSeconds to nanoseconds
Current Unix time
● -
ISO 8601 · UTC
-
Your local time
-

Everything included

Smart unit auto-detectionUnix to ISO, SQL and RFC 2822JWT expiration decoderDiff calculator and business daysCode snippets in 6 languages12 time zone live viewRelative timeDiscord timestampsms vs seconds warningsShareable linksDST aware

Dedicated tools

Live ToolAll processing local. No data sent.
● --
Waiting for inputSeconds, milliseconds, microseconds and nanoseconds are detected from the digit count.

Quick Answers: Unix Timestamp Converter

What Is a Unix Timestamp?

Quick answer: A unix timestamp is the number of seconds since midnight UTC on 1 January 1970, ignoring leap seconds. It is also called epoch time or POSIX time.

A unix timestamp is a single number that names one instant in time. The count starts at 1 January 1970 at 00:00:00 UTC, an agreed starting point called the Unix epoch, and it has ticked upward by one every second since. The value 1715429912 means Saturday, 11 May 2024 at 12:18:32 UTC, and it means that on every machine in the world, in every time zone, because the number itself carries no zone at all.

That zone-free quality is why timestamps took over computing. A date written as text needs a format and a time zone to be understood, and two systems can write the same instant a dozen different ways. A timestamp is one integer. It sorts as a number, compares as a number, and stores as a number, which is why databases keep created_at columns as timestamps, APIs pass expiry times as timestamps, and logs record events as timestamps. The readable date is only produced at the end, when a person needs to see it, which is exactly what the converter above does.

The count ignores leap seconds. When the Earth rotation people add a leap second to UTC, the unix count simply does not count it, so unix time runs a little behind true UTC over the decades. For almost all software that difference does not matter, and every language in the code cards below follows the same rule, so two systems converting the same timestamp still agree with each other.

How to Use This Unix Timestamp Converter

Quick answer: Paste a number or a date, check the detected unit, and copy the format you need. Use the date picker to go the other way.
  1. Paste a value. A plain number such as 1715429912, a millisecond value such as 1715429912000, an ISO date such as 2024-05-11T12:18:32Z, or a human date such as 11 May 2024 12:18:32. The word now works too, and gives the current moment.
  2. Check the detected unit. The badge under the box names what the tool thinks the value is: Unix seconds, milliseconds, microseconds, nanoseconds, or a date. If the length does not match any of those, the tool says so instead of guessing, and the unit override lets you pick the unit yourself.
  3. Copy the format you need. Every row has a copy button, and Copy all results takes the whole set at once. The UTC row is the same for everyone, so start there when the value will be shared with people in other zones.
  4. Go the other way with the date picker. Pick a date and time in your local time to get its unix timestamp in seconds and milliseconds.
  5. Share the result. The shareable link row holds a link that reopens the same timestamp, so a colleague opening it sees the same conversion.

Unix Timestamp Converter: Seconds vs Milliseconds vs Microseconds vs Nanoseconds

Quick answer: The unit is the digit count. Ten digits is seconds, 13 is milliseconds, 16 is microseconds and 19 is nanoseconds. The same instant in each unit is a different length of number.

Every system counts the same epoch, but they count it in different units. Unix seconds are the original unit, and most systems still use them: Python time.time(), PHP time(), Go time.Now().Unix() and most database columns. JavaScript broke with that tradition and counts milliseconds, so Date.now() returns a 13 digit number. Java System.currentTimeMillis() does the same. Microseconds, 16 digits, show up in Python time.time_ns() divided by 1000, in PostgreSQL, and in many log formats. Nanoseconds, 19 digits, come from Go time.Now().UnixNano() and from databases built for high frequency data such as InfluxDB.

UnitDigitsExample for 11 May 2024, 12:18:32 UTCTypical source
Unix seconds101715429912Python, PHP, Go, Rust, MySQL
Milliseconds131715429912000JavaScript, Java
Microseconds161715429912000000PostgreSQL, Python logs
Nanoseconds191715429912000000000Go, InfluxDB

The trap is that the arithmetic is trivial and the mistake is silent. Dividing by 1000 is easy; noticing that you needed to divide is the hard part. A millisecond value read as seconds gives a date tens of thousands of years in the future, and a second value read as milliseconds gives a date in January 1970. Both look like a broken converter when the real fault is the unit. This tool guards against that twice: it names the detected unit in plain words, and it warns when a short value had to be assumed as seconds, or when a length matches nothing at all.

Convert a Unix Timestamp to a Date

Quick answer: Paste the number above. The UTC row is the unambiguous reading, and the local row is the same instant in your own time zone.

Converting a unix timestamp to a date means counting forward from the epoch by that many seconds. In code it is one line in most languages, and the only thing to watch is the unit your language expects. JavaScript Date takes milliseconds, so a seconds value must be multiplied by 1000 first. Python, PHP, Go and Rust constructors take seconds, so the value goes in unchanged. The converter above does that step for you and shows the result in every format at once, so you can check the UTC reading against your local reading before trusting either.

When you share a converted date with someone, share the UTC reading. Local times need the zone attached to be understood, and a bare local time in a message has caused more confusion than any timestamp bug. The shareable link on this page carries the timestamp itself, not a formatted date, so whoever opens it sees the conversion in their own zone.

Convert a Date to a Unix Timestamp

Quick answer: Paste a date into the converter, or use the date picker below the results. Always include a time zone designator, such as Z or +02:00, in date strings.

Going the other way, the converter accepts ISO 8601 dates such as 2024-05-11T12:18:32Z, date-only values such as 2024-05-11, which are read as midnight UTC, RFC 2822 dates such as Sat, 11 May 2024 12:18:32 GMT, and most human-readable dates a browser can parse. The Unix seconds row is the number to store in a database column or send in an API call.

The one rule that matters is the time zone designator. A date string with no Z and no offset is read in the local time zone of the machine doing the parsing, so the same string gives a different timestamp in Karachi than in London. A string with Z means UTC, and the timestamp is then the same everywhere. The date picker below the results is the exception: it takes your local time on purpose, and says so on the label.

Unix Timestamp Code in JavaScript, Python, PHP, Java, Go and Rust

Quick answer: JavaScript needs milliseconds, the rest take seconds. Every snippet below was run and checked against 1715429912, which is 11 May 2024 at 12:18:32 UTC.

Each language below does the same two jobs: turn 1715429912 into a date, and read the current timestamp. Copy the one you need. The JavaScript trap is the only real surprise: new Date takes milliseconds, so the seconds value is multiplied by 1000, while Date.now() already returns milliseconds, so it is divided by 1000 to get seconds.

JavaScript
// Unix seconds to date
const date = new Date(1715429912 * 1000);
date.toISOString(); // "2024-05-11T12:18:32.000Z"

// Current Unix timestamp
const now = Math.floor(Date.now() / 1000);
Python
import time
from datetime import datetime, timezone

# Unix seconds to date
dt = datetime.fromtimestamp(1715429912, timezone.utc)
print(dt)  # 2024-05-11 12:18:32+00:00

# Current Unix timestamp
now = int(time.time())
PHP
<?php
date_default_timezone_set('UTC');

// Unix seconds to date
echo date('Y-m-d H:i:s', 1715429912); // 2024-05-11 12:18:32

// Current Unix timestamp
$now = time();
Java
import java.time.Instant;

// Unix seconds to date
Instant instant = Instant.ofEpochSecond(1715429912);
System.out.println(instant); // 2024-05-11T12:18:32Z

// Current Unix timestamp
long now = Instant.now().getEpochSecond();
Go
package main

import (
    "fmt"
    "time"
)

func main() {
    // Unix seconds to date
    t := time.Unix(1715429912, 0).UTC()
    fmt.Println(t) // 2024-05-11 12:18:32 +0000 UTC

    // Current Unix timestamp
    now := time.Now().Unix()
    fmt.Println(now)
}
Rust
use chrono::{DateTime, Utc};

// Unix seconds to date
let dt = DateTime::from_timestamp(1715429912, 0).unwrap();
println!("{}", dt); // 2024-05-11 12:18:32 UTC

// Current Unix timestamp
let now = Utc::now().timestamp();

For Rust, add chrono version 0.4 to Cargo.toml for the snippet above. The standard library can count seconds since the epoch, but formatting them as a date needs the chrono crate.

The Year 2038 Problem

Quick answer: Signed 32 bit timestamps end at 2147483647, which is 19 January 2038 at 03:14:07 UTC. One second later they wrap negative.

Many older systems store a unix timestamp in a signed 32 bit integer, which holds values from minus 2147483648 to plus 2147483647. The top of that range is 19 January 2038 at 03:14:07 UTC. One second past it, the number overflows and becomes negative, so a date that should read 2038 reads as 13 December 1901 instead. That is the year 2038 problem, the timestamp version of the year 2000 bug.

It matters most in embedded systems, old file formats and 32 bit databases, where the storage type is fixed and cannot be widened without a migration. Modern systems store timestamps in 64 bits, where the limit sits about 292 billion years in the future, so for new code the problem is already solved. If you are reading an old system, check the storage type before trusting any date past 2038. This converter handles the full 64 bit range, and it flags values near the 32 bit limit in the results.

Other Systems That Count Time Differently

Quick answer: Windows, .NET, Chrome, Excel and Apple all count from different starting points. The table below converts the same instant, 11 May 2024 at 12:18:32 UTC, into each of them.

Not every system counts from 1970. When a timestamp comes out of Windows, a spreadsheet or a forensic tool, the number looks wrong until you know which epoch it counts from. The values below are all the same instant, 1715429912 in unix seconds, converted into each system, and each one was worked out by hand and checked.

SystemCounts fromValue for 11 May 2024, 12:18:32 UTC
Windows FILETIME1 January 1601, 100 ns ticks133599035120000000
.NET DateTime ticks1 January 0001, 100 ns ticks638510267120000000
WebKit / Chrome1 January 1601, microseconds13359903512000000
Excel serial number30 December 1899, days45423.51287
Mac HFS+1 January 1904, seconds3798274712
Apple Cocoa1 January 2001, seconds737122712
NTP1 January 1900, seconds3924418712

If a number you received has 17 or 18 digits and the date looks wrong, check this table first. A Windows FILETIME value pasted into a unix converter reads as a date hundreds of thousands of years in the future, and an Excel serial pasted in reads as a few hours after the epoch. The unit override in the tool above cannot fix those, because they are not unix units at all, but knowing the epoch is usually enough to convert them by hand.

Famous Unix Timestamps Worth Knowing

Quick answer: Zero is the epoch itself, one billion seconds fell in September 2001, and the 32 bit limit falls in January 2038.

A few timestamps are worth recognising on sight, because they show up in documentation, tests and interview questions. Each one below was converted and checked.

TimestampWhat it is
01 January 1970 at 00:00:00 UTC, the epoch itself.
10000000009 September 2001 at 01:46:40 UTC, the billionth second.
123456789013 February 2009 at 23:31:30 UTC, the counting-numbers milestone.
150000000014 July 2017 at 02:40:00 UTC.
171542991211 May 2024 at 12:18:32 UTC, the example used across this site.
200000000018 May 2033 at 03:33:20 UTC.
214748364719 January 2038 at 03:14:07 UTC, the largest signed 32 bit timestamp.

Unix Timestamp Converter FAQs

What is a unix timestamp converter?

A unix timestamp converter turns a bare number into a readable date, or a readable date back into a bare number. The number counts seconds since 1 January 1970 at 00:00:00 UTC, the Unix epoch. Paste a value into the tool above and it shows the same instant in UTC, your local time, ISO 8601, SQL format, RFC 2822 and more, with a copy button on every row.

How do I convert a unix timestamp to a date?

Paste the number into the converter at the top of this page. The tool reads the unit from the digit count, then shows the date in UTC first, because UTC is the same for everyone, and in your local time second. If you only need one format, copy the row you want. The date picker below the results works the other way: pick a date and time to get its timestamp.

How does this unix time converter tell seconds from milliseconds?

By counting digits. A 10 digit number is Unix seconds, 13 digits is milliseconds, 16 digits is microseconds and 19 digits is nanoseconds. That is how JavaScript, Python, PHP, Go and databases each hand you a different length for the same instant. If the length does not match one of those four, the tool says so plainly instead of guessing, and the unit override lets you pick the unit yourself.

What is the difference between unix seconds and milliseconds?

Only the unit. Unix seconds count whole seconds since the epoch, and milliseconds count thousandths of a second, so the millisecond value is the second value times 1000. JavaScript Date.now() returns milliseconds, while Python time.time() and PHP time() return seconds. Treating one as the other is the most common timestamp bug: a millisecond value read as seconds lands in the year 50000, and a second value read as milliseconds lands in January 1970.

What is the maximum unix timestamp value?

For systems that store the timestamp in a signed 32 bit number, the maximum is 2147483647, which is 19 January 2038 at 03:14:07 UTC. One second past that, the number wraps to a negative value and the date jumps back to 1901. That is the year 2038 problem. Modern systems store timestamps in 64 bits, where the limit is so far away it does not matter in practice.

Why does my timestamp show 1970?

Almost always because the unit was wrong. If a 13 digit millisecond value is read as seconds, the date lands far in the future, and if a 10 digit second value is read as milliseconds, the date lands in January 1970, a few seconds after the epoch. Check the digit count first: 10 means seconds, 13 means milliseconds. This converter names the unit it detected, so a wrong reading is visible at once.

Is a unix timestamp the same in every time zone?

Yes. The timestamp itself has no time zone. The number 1715429912 means Saturday, 11 May 2024 at 12:18:32 UTC on every machine in the world. What changes with the time zone is only how that instant is written out: 08:18:32 in New York, 13:18:32 in London, 17:18:32 in Karachi and 21:18:32 in Tokyo, all the same moment. That is why the tool shows UTC first and labels every other row with its zone.

How do I get the current unix timestamp in JavaScript, Python and PHP?

In JavaScript, Math.floor(Date.now() / 1000) gives seconds, because Date.now() returns milliseconds. In Python, int(time.time()) gives seconds, and time.time_ns() gives nanoseconds. In PHP, time() gives seconds. All three read the same clock, so they agree to within a second. The code cards further down this page show each one in full, with the date conversion beside it.

What is ISO 8601, and how is it different from a unix timestamp?

ISO 8601 is a written format for dates, such as 2024-05-11T12:18:32Z, while a unix timestamp is a plain number, such as 1715429912. They describe the same instant in different shapes. Use the timestamp in databases, APIs and logs, because it sorts and compares as a number. Use ISO 8601 in JSON payloads and anywhere a human might read the value, because the date is visible at a glance. This converter shows both for every input.

Does this converter send my data to a server?

No. Everything on this page runs in your browser with JavaScript. The number you paste is converted on your own device, and there is no server side to send it to. There is no account, no signup and nothing uploaded. The shareable link only puts the timestamp in the page address, so opening that link later fills the same value back in.

How do I convert a date to a unix timestamp in a different time zone?

Set the time zone first, then convert. A timestamp has no time zone of its own, so the only thing that matters is which zone your wall-clock time belongs to: 12:00 in Karachi and 12:00 in London are different instants, hours apart. Use the timezone converter on this site to pick the zone and the date, and it gives you the timestamp for that exact moment. If you convert a date without setting the zone, the tool reads it in your browser's local time, which is the most common source of off-by-hours errors.

Should I store unix timestamps in seconds or milliseconds in my database?

Seconds for most cases, milliseconds only when you need sub-second precision. Databases, APIs and server logs almost always use seconds, and JavaScript is the main exception: Date.now() returns milliseconds. If your front end sends milliseconds and your database expects seconds, divide by 1000 before storing, or the dates land in the year 50000. Store the value as a plain integer, never as a float, and keep one unit across the whole system so the two never get mixed.

Source: the Unix epoch, 1 January 1970 at 00:00:00 UTC, as defined by POSIX. Every reference value on this page was converted and checked in JavaScript and Python on 27 November 2026.