Chrono Time ES

Unix Timestamp Converter: Epoch Time to Date and Back (2026)

Convert epoch seconds or milliseconds to a readable date — and any date back to a Unix timestamp — with copy-paste code for 10 languages.

A Unix timestamp is the number of seconds elapsed since January 1, 1970 at 00:00:00 UTC (the "Unix epoch"). Right now that number is around 1.78 billion. Timestamps in seconds have 10 digits until the year 2286; values with 13 digits are milliseconds. Paste any value below to get the exact date in UTC and your local time zone.

Current Unix time (s) 0
Current Unix time (ms) 0

Timestamp → date

Date → timestamp

What is a Unix timestamp?

A Unix timestamp (also called epoch time, POSIX time or Unix time) is a single integer that counts the seconds since 00:00:00 UTC on January 1, 1970. That starting point is the Unix epoch.

Because it is one number with no time zone, no daylight-saving rules and no calendar format, it is the standard way computers store and exchange moments in time:

Where you'll see itExample
API responses (JSON)"created_at": 1782950400
Database columnsMySQL INT/TIMESTAMP, PostgreSQL to_timestamp()
Log files[1782950400] GET /index.html 200
JWT tokens"exp": 1782954000 (expiry)
Cookies and cache headersExpires, max-age calculations

Negative timestamps are valid too: they represent dates before 1970. For example, -86400 is December 31, 1969 at 00:00 UTC.

Seconds vs milliseconds: how to tell them apart

The most common conversion bug: mixing up units. The rule of thumb in 2026 is the digit count:

DigitsUnitExampleUsed by
10Seconds1782950400Unix/Linux, PHP, Python, MySQL, most APIs
13Milliseconds1782950400000JavaScript Date.now(), Java, MongoDB
16Microseconds1782950400000000Some databases, high-precision logs
19Nanoseconds1782950400000000000Go time.UnixNano(), system tracing

If you convert a 13-digit value as seconds you'll get a date 56,000+ years in the future. If you convert a 10-digit value as milliseconds you'll land in January 1970. Both are instantly recognizable signs of a unit mismatch — divide or multiply by 1,000 to fix it. This tool auto-detects the unit from the digit count.

Unix timestamp conversion table

Handy reference values (all UTC):

TimestampDate (UTC)Meaning
01970-01-01 00:00:00The Unix epoch
10000000002001-09-09 01:46:401 billion seconds
15000000002017-07-14 02:40:001.5 billion
17500000002025-06-15 15:06:401.75 billion
20000000002033-05-18 03:33:202 billion
21474836472038-01-19 03:14:0732-bit signed limit ("Y2038")

And the arithmetic you use daily:

PeriodSeconds
1 hour3,600
1 day86,400
1 week604,800
30 days2,592,000
365 days31,536,000

Get the current timestamp in 10 languages

// JavaScript — Date.now() returns milliseconds!
Math.floor(Date.now() / 1000)   // seconds

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

// PHP
time();

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

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

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

// C#
DateTimeOffset.UtcNow.ToUnixTimeSeconds();

# Ruby
Time.now.to_i

# Bash / Linux
date +%s

// Swift
Int(Date().timeIntervalSince1970)

Convert a timestamp to a date (code)

// JavaScript — multiply seconds by 1000
new Date(1782950400 * 1000).toISOString()
// "2026-07-01T00:00:00.000Z"

# Python — UTC-aware (recommended)
from datetime import datetime, timezone
datetime.fromtimestamp(1782950400, tz=timezone.utc)

-- MySQL
SELECT FROM_UNIXTIME(1782950400);
-- PostgreSQL
SELECT to_timestamp(1782950400);

// PHP
date('Y-m-d H:i:s', 1782950400);   // server time zone
gmdate('Y-m-d H:i:s', 1782950400); // UTC

And the reverse, date to timestamp:

// JavaScript
Math.floor(new Date('2026-07-01T00:00:00Z').getTime() / 1000)

# Python
from datetime import datetime, timezone
int(datetime(2026, 7, 1, tzinfo=timezone.utc).timestamp())

-- MySQL
SELECT UNIX_TIMESTAMP('2026-07-01 00:00:00');

Unix time and time zones

A Unix timestamp is always UTC — it has no time zone of its own. The time zone only appears when you format it for humans:

Need to see what a timestamp means across cities? Use our time zone converter after converting.

The year 2038 problem

On January 19, 2038 at 03:14:07 UTC the timestamp reaches 2147483647 — the maximum value of a signed 32-bit integer. Systems that still store Unix time in 32 bits will overflow to a negative number and read the date as December 1901.

Modern 64-bit systems are safe for ~292 billion years, but the problem persists in embedded devices, old file formats and legacy databases. If you maintain long-lived systems (contracts, mortgages, certificates expiring after 2038), verify your storage type today.

Common mistakes

Frequently asked questions

What is a Unix timestamp?
The number of seconds elapsed since January 1, 1970 at 00:00:00 UTC. It's a single time-zone-free integer that computers use to store and compare moments in time. Today's timestamps are 10-digit numbers around 1.78 billion.
What is the Unix epoch?
The fixed starting point of Unix time: midnight UTC on January 1, 1970. All Unix timestamps count seconds from that instant. Dates before it are represented with negative numbers.
Is a POSIX timestamp the same as a Unix timestamp?
Yes. POSIX time, Unix time and epoch time all refer to the same standard: seconds since 1970-01-01 00:00:00 UTC, excluding leap seconds, as defined in the POSIX specification.
How do I convert a Unix timestamp to a date?
Divide by 1,000 first if it has 13 digits (milliseconds). Then use your language's converter — new Date(ts*1000) in JavaScript, datetime.fromtimestamp(ts, tz=timezone.utc) in Python, FROM_UNIXTIME(ts) in MySQL — or paste it in the tool above.
How do I get the current Unix timestamp?
Math.floor(Date.now()/1000) in JavaScript, int(time.time()) in Python, time() in PHP, date +%s in a Linux terminal, or just look at the top of this page — the live value updates every second.
Is Unix time in seconds or milliseconds?
The standard is seconds. JavaScript and Java, however, work in milliseconds by default. Count the digits: 10 digits = seconds, 13 digits = milliseconds.
What time zone is a Unix timestamp in?
None — or strictly, always UTC. The timestamp is an absolute instant; time zones only apply when you format it into a human-readable date.
Does Unix time count leap seconds?
No. Every Unix day is exactly 86,400 seconds. When a leap second occurs, Unix time repeats or stretches a second so the day count stays uniform.
What's the Year 2038 problem?
On January 19, 2038, Unix time exceeds the 32-bit signed integer limit (2,147,483,647). Legacy 32-bit systems will overflow and misread dates as 1901. 64-bit systems are unaffected.
Can Unix timestamps be negative?
Yes — negative values represent dates before January 1, 1970 UTC. For example, -31536000 corresponds to January 1, 1969.
How many digits does a Unix timestamp have?
Timestamps in seconds have 10 digits from 2001 (timestamp 1,000,000,000) until 2286. If you see 13 digits, it's milliseconds; 16 is microseconds; 19 is nanoseconds.
How do I convert a date to a Unix timestamp?
Use the "Date → timestamp" mode above, or in code: Math.floor(new Date('2026-07-01').getTime()/1000) (JavaScript), UNIX_TIMESTAMP('2026-07-01') (MySQL).

Related tools

🍪 Cookie preferencesPreferencias de cookies We use cookies for analytics and personalized ads. You can accept or reject optional cookies. Essential cookies are always on. Learn more. Usamos cookies para analítica y anuncios personalizados. Puedes aceptar o rechazar las opcionales. Las esenciales siempre están activas. Más información.