Epoch & Unix timestamp converter

Unix time, or epoch time, is the number of seconds since 00:00:00 UTC on 1 January 1970. The current Unix timestamp ticks live below. Paste anything with a time in it, from a timestamp in any unit to an ISO date, a hex value, a MongoDB ObjectId or plain words, and read it in every format and every zone, converted right in your browser.

Loading the converter…

How the converter works

An epoch converter answers one question: which moment does this number mean? This one takes the number in any unit, or the moment in any notation, and shows the same instant every way a person or a program might want it. There is one field, no Convert button, and no account.

  1. Step 1

    Paste anything

    Ten digits are seconds, thirteen are milliseconds, sixteen microseconds, nineteen nanoseconds. ISO 8601, RFC 2822, hex, ObjectIds and plain words all work. The line under the field says what was assumed, and Read as overrides it.

  2. Step 2

    Read it in words and in zones

    The date in your zone with how far away it is, then the same instant in UTC and the cities you pinned on the time zone converter, shaded by daytime, evening and night.

  3. Step 3

    Copy the shape you need

    Every machine format has its own copy button, and the code sample is written with your value, so it pastes straight into a test or a query.

Example: 1,700,000,000, every way

Unix timestamp 1700000000 is Tuesday, 14 November 2023 at 22:13:20 UTC. Here is the same instant in each format the converter lists.

Unix seconds1700000000
Milliseconds1700000000000
Microseconds1700000000000000
Nanoseconds1700000000000000000
ISO 8601 · UTC2023-11-14T22:13:20.000Z
RFC 2822Tue, 14 Nov 2023 22:13:20 +0000
HTTP date · RFC 7231Tue, 14 Nov 2023 22:13:20 GMT
Excel serial45244.925925926
Hex seconds0x6553f100
ObjectId · earliest6553f1000000000000000000
Discord tag<t:1700000000:F>

Seconds, at a glance

1 hour3,600 s
1 day86,400 s
1 week604,800 s
1 month (30.44 days)2,629,743 s
1 year (365.24 days)31,556,926 s

Did you know?

Just after 03:14:07 UTC on 19 January 2038, a lot of old computers will decide it is 13 December 1901. Unix time is a count of seconds since 1970, and the 32-bit box many systems keep it in tops out at 2,147,483,647. One more second and the count wraps around, taking the date with it.

Your laptop is safe. Modern systems moved to 64-bit time, which is good for another 292 billion years. The ones to worry about are the devices nobody updates: routers, factory controllers, and that one database column from 2009. Paste a value past the limit here and the converter will tell you. Dates before 1970 are just negative numbers and convert like any other.

Get the current Unix timestamp in code

Each line returns the current Unix time in seconds unless it says otherwise. Every one of them counts from the same epoch, so the values match across languages.

JavaScript

Math.floor(Date.now() / 1000)   // seconds
Date.now()                      // milliseconds

Python

import time
int(time.time())

Go

time.Now().Unix()        // seconds
time.Now().UnixMilli()   // milliseconds

Java

Instant.now().getEpochSecond()   // seconds
System.currentTimeMillis()       // milliseconds

C#

DateTimeOffset.UtcNow.ToUnixTimeSeconds()

PHP

time()

Ruby

Time.now.to_i

Rust

use std::time::{SystemTime, UNIX_EPOCH};
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()

PostgreSQL

SELECT floor(extract(epoch FROM now()))::bigint;

MySQL

SELECT UNIX_TIMESTAMP();

Shell

date +%s

Epoch converter FAQ

Is my timestamp in seconds or milliseconds?
Count the digits. Ten digits is seconds and covers 2001 to 2286; thirteen is milliseconds, the JavaScript default. The converter picks the unit that lands in a plausible year and tells you what the other reading would have been.
Why does my date come out a few hours off?
A date and time without a zone is read in your browser’s zone, but a date on its own, like 2026-10-20, is midnight UTC, as the ISO 8601 rules say. Add a Z or an offset such as +05:30 to pin it, or set Read as to Date text and check the UTC row.
What is the current Unix timestamp?
The number of seconds since 00:00:00 UTC on 1 January 1970, and it goes up by one every second. The Now bar at the top of this page shows it live. In code it is Math.floor(Date.now() / 1000) in JavaScript, int(time.time()) in Python and date +%s in a shell.
What is the Unix epoch?
Midnight UTC on 1 January 1970. A Unix timestamp counts the seconds since then, leaving out leap seconds, so 0 is the epoch itself, 1700000000 is 14 November 2023, and dates before 1970 are negative numbers.

Or stop doing time arithmetic altogether

The converter is for the values you want to check by hand. Blockit is for the meetings behind them: CC it on an email or Slack thread and it proposes times that work in every participant's time zone, handles the daylight saving edge cases, and sends the invite. It works with Google Calendar and Outlook, and the first 30 days are free.

Try Blockit for free