FixThatApp

Unix Timestamp Converter: Complete Guide to Epoch Time

Updated March 19, 2026

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC. It is the single most common way computers store and compare dates and times in code, databases, and APIs. If you have ever seen a number like 1742380800 in a log file or API response and wondered what it means — this guide explains everything.

Why Unix Timestamps Exist

Human-readable date strings like "March 19, 2026 09:00 AM" are complicated for computers. They require parsing, timezone handling, and locale awareness. A Unix timestamp is just an integer — simple to store, sort, and compare. Subtract two timestamps and you get the elapsed seconds instantly. That is why timestamps appear in:

Seconds vs Milliseconds

This is the most common source of confusion. Unix timestamps traditionally count seconds, but JavaScript's Date.now() returns milliseconds. A seconds-based timestamp for March 2026 is around 1742000000 (10 digits). A milliseconds-based timestamp is around 1742000000000 (13 digits). If a timestamp looks 1000× too large, you are likely looking at milliseconds when you expected seconds.

FormatExample valueDigits
Unix seconds174238080010
Unix milliseconds174238080000013
Unix microseconds174238080000000016

Notable Unix Timestamps

TimestampDateSignificance
0Jan 1, 1970 00:00 UTCThe Unix epoch — the origin point
1000000000Sep 9, 2001Unix time hit 1 billion
1234567890Feb 13, 2009Celebrated by developers worldwide
2147483647Jan 19, 2038Y2K38: max value for 32-bit signed int
2000000000May 18, 2033Unix time hits 2 billion
The Y2K38 Problem

Systems that store Unix time as a 32-bit signed integer will overflow on January 19, 2038 at 03:14:07 UTC. Modern 64-bit systems can store timestamps hundreds of billions of years into the future, but embedded systems and legacy software may still be affected. Check that your database timestamp columns use 64-bit integers or the TIMESTAMP(6) type.

Getting the Current Timestamp in Code

JavaScript

// Milliseconds (divide by 1000 for seconds)
Date.now()                          // e.g. 1742380800000
Math.floor(Date.now() / 1000)       // seconds: 1742380800

// From a Date object
new Date().getTime()                // milliseconds

Python

import time
time.time()           # seconds as float: 1742380800.123
int(time.time())      # integer seconds: 1742380800

# Using datetime
from datetime import datetime, timezone
datetime.now(timezone.utc).timestamp()

PHP

time()          // current Unix timestamp in seconds
microtime(true) // with microseconds as float

SQL

-- MySQL / MariaDB
SELECT UNIX_TIMESTAMP();
SELECT UNIX_TIMESTAMP('2026-03-19 09:00:00');

-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW());

-- SQLite
SELECT strftime('%s', 'now');

Convert Any Unix Timestamp Instantly

Paste a timestamp and get the human-readable date in your local timezone — or convert a date back to a timestamp.

Open the Timestamp Converter

Converting a Timestamp to a Readable Date

To convert 1742380800 back to a date, the tool (or your code) takes the number of seconds, adds them to January 1 1970, and applies the target timezone offset. The same timestamp will display as a different local time depending on the viewer's timezone — but it always refers to the exact same moment in time.

JavaScript example

const ts = 1742380800;
const date = new Date(ts * 1000); // multiply by 1000 for ms
console.log(date.toISOString());   // "2026-03-19T08:00:00.000Z"
console.log(date.toLocaleString()); // local timezone

Python example

from datetime import datetime, timezone
ts = 1742380800
dt = datetime.fromtimestamp(ts, tz=timezone.utc)
print(dt.isoformat())  # 2026-03-19T08:00:00+00:00

Unix Timestamps in JWT Tokens

JSON Web Tokens use Unix timestamps for two critical claims: iat (issued at) and exp (expires at). If a JWT is expiring unexpectedly or "in the past", the first thing to check is whether the server clock is in sync. An NTP drift of even a few minutes can cause token rejections. Use our JWT Decoder guide to inspect token claims directly.

How to Use the Unix Timestamp Converter Tool

  1. Open the Unix Timestamp Converter
  2. To convert a timestamp to a date: paste the number (seconds or milliseconds) into the timestamp field and click Convert
  3. To convert a date to a timestamp: enter the date and time, select the timezone, and the tool returns the corresponding Unix timestamp
  4. The result shows both UTC and your local time

Common Mistakes