Skip to content
  1. Home
  2. Developer Tools
  3. Unix Timestamp Converter

Unix Timestamp Converter

Convert Unix epoch time to a human date and back, in seconds or milliseconds, for any timezone.

Runs 100% in your browser Free, no sign-up Updated

Current Unix time

Click a value to copy
— — —

Timestamp → date

Date → timestamp

How to use the Unix Timestamp Converter

  1. Paste a timestamp. Seconds, milliseconds, microseconds and nanoseconds are detected from the number of digits.
  2. Read it as UTC, your local time, ISO 8601, RFC 2822 and relative time, or pick another timezone.
  3. To go the other way, choose a date, time and timezone to get the timestamp in seconds and milliseconds.
  4. Click any value to copy it.

What is Unix time?

Unix time — also called epoch time or POSIX time — counts the seconds that have elapsed since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. Because it is a single number with no timezone, it is the simplest reliable way to store, sort and compare moments in time across servers, databases and programming languages. You will find Unix timestamps in log files, JWT exp and iat claims, HTTP caching headers, database columns, analytics events and API responses.

Seconds, milliseconds, microseconds or nanoseconds?

Digits (today)UnitTypical source
10SecondsPHP time(), Python int(time.time()), MySQL UNIX_TIMESTAMP(), JWT claims
13MillisecondsJavaScript Date.now(), Java System.currentTimeMillis(), Kafka, Elasticsearch
16MicrosecondsPostgreSQL internals, Python time.time_ns() // 1000, BigQuery
19NanosecondsGo time.Now().UnixNano(), Prometheus, OpenTelemetry

The converter detects the unit from the number of digits; choose a unit manually if your timestamp is very old or far in the future.

Get the current timestamp in code

// JavaScript / Node.js
Math.floor(Date.now() / 1000)

# Python
import time; int(time.time())

// PHP
time();

// Go
time.Now().Unix()

// Java
Instant.now().getEpochSecond()

# Bash
date +%s

-- MySQL / PostgreSQL
SELECT UNIX_TIMESTAMP();            -- MySQL
SELECT EXTRACT(EPOCH FROM NOW());   -- PostgreSQL

Convert a timestamp to a date in code

// JavaScript
new Date(1767225600 * 1000).toISOString()

# Python
from datetime import datetime, timezone
datetime.fromtimestamp(1767225600, tz=timezone.utc)

// PHP
gmdate('c', 1767225600);

# Bash (GNU date)
date -u -d @1767225600

Timezones and the year 2038 problem

A Unix timestamp never has a timezone; it only gets one when you format it as a calendar date. Store timestamps (or ISO 8601 strings with an offset) and convert to the user’s timezone at display time. Systems that store seconds in a signed 32-bit integer will overflow at 2147483647 — 03:14:07 UTC on 19 January 2038 — so use 64-bit integers for anything long-lived.

Need to know when a scheduled job will next run? Try the Cron Expression Parser.

Frequently asked questions

What is a Unix timestamp?
The number of seconds elapsed since 00:00:00 UTC on 1 January 1970 (the Unix epoch), not counting leap seconds. It is the same everywhere in the world, which makes it a safe way to store and compare points in time.
Is my timestamp in seconds or milliseconds?
Count the digits. Present-day timestamps have 10 digits in seconds and 13 in milliseconds. JavaScript Date.now() and Java System.currentTimeMillis() return milliseconds; PHP time() and Python int(time.time()) return seconds.
Does a Unix timestamp have a timezone?
No. It always counts from the epoch in UTC. A timezone only matters when you display it as a calendar date, which is why the same timestamp shows different local times around the world.
What is the year 2038 problem?
Systems that store timestamps as signed 32-bit integers overflow at 2147483647, which is 03:14:07 UTC on 19 January 2038. Using 64-bit integers avoids it.
How do I get the current timestamp in code?
JavaScript Math.floor(Date.now()/1000), Python int(time.time()), PHP time(), Go time.Now().Unix(), Bash date +%s, MySQL UNIX_TIMESTAMP().

Last updated . Launched with auto unit detection, timezone conversion and live epoch clock.

Building something that needs live data?

ProWebLook APIs validate phone numbers, check WhatsApp accounts, verify emails and geolocate IPs. Try every endpoint in the browser, then grab a free API key.

Open API Playground