Epoch & Unix Timestamp Converter
Convert a Unix timestamp to a human-readable date, or a date to epoch seconds and milliseconds. Runs in your browser; nothing is uploaded.
- ISO 8601 (UTC)
- UTC
- Your local time
- Relative
- Seconds
- Milliseconds
- Epoch seconds
- Epoch milliseconds
- ISO 8601 (UTC)
Unix epoch time counts the seconds elapsed since 00:00:00 UTC on 1 January 1970 — one plain number that identifies an absolute instant with no timezone or calendar ambiguity, which is why databases, logs and APIs store time this way. Paste any timestamp above and the converter detects whether it is in seconds (10 digits), milliseconds (13 digits), microseconds (16) or nanoseconds (19) and shows the instant as ISO 8601, UTC, your local time and a relative phrase; the reverse direction turns any calendar date into epoch seconds and milliseconds. Negative timestamps (dates before 1970) work too. Everything runs in your browser — nothing you type is sent anywhere.
Getting the current epoch time in code
The same value this page shows live, in the languages you are most likely to need it:
// JavaScript — milliseconds, then seconds
Date.now() // 1756130000000
Math.floor(Date.now() / 1000) // 1756130000# Python — seconds (float), then integer
import time
time.time() # 1756130000.123456
int(time.time()) # 1756130000-- SQL
SELECT extract(epoch from now()); -- PostgreSQL
SELECT UNIX_TIMESTAMP(); -- MySQL
SELECT strftime('%s','now'); -- SQLite# Shell — seconds, and converting a timestamp back to a date
date +%s
date -u -d @1756130000 # GNU/Linux
date -u -r 1756130000 # macOS / BSDFrequently Asked Questions
What is Unix epoch time?
Unix epoch time (also called Unix time or POSIX time) is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. That starting instant is called the epoch. Because it is a single ever-increasing number with no timezone, no daylight-saving rules and no calendar ambiguity, it is the standard way computers store and exchange points in time — databases, log files, APIs and operating systems all use it internally, converting to a human-readable date only when displaying to a person.
Is my timestamp in seconds or milliseconds?
Count the digits: timestamps for present-day dates have 10 digits in seconds (1756130000), 13 digits in milliseconds (1756130000000), 16 in microseconds and 19 in nanoseconds. Unix tools, most APIs and Python's time.time() use seconds; JavaScript's Date.now() and Java's System.currentTimeMillis() use milliseconds; some databases and tracing systems use micro- or nanoseconds. This converter detects the unit automatically from the magnitude of the number you paste, and tells you which unit it assumed.
Do Unix timestamps depend on timezones?
No — Unix timestamps do not depend on timezones, and that is their main virtue. A Unix timestamp identifies one absolute instant, the same everywhere on Earth. Timezones only enter the picture when you convert that instant into a calendar date and wall-clock time for display: the same timestamp renders as different local times in Tokyo and New York, but it is still the same moment. That is why this tool shows both the UTC form and your browser's local form side by side — they are two views of one instant, not two different times.
What is the year 2038 problem?
Systems that store Unix time in a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038, when the count of seconds exceeds 2,147,483,647 — the timestamp wraps to a negative number and the date jumps back to 1901. Modern operating systems, languages and databases have largely moved to 64-bit time values, which are good for roughly 292 billion years, but embedded devices and old file formats can still be affected. This converter uses JavaScript's 64-bit floating-point dates, so dates far beyond 2038 convert correctly.
Can a Unix timestamp be negative, and is my data private here?
Yes — a negative timestamp simply counts seconds backwards from the epoch, so it represents a date before 1 January 1970. For example, -86400 is 31 December 1969 at 00:00:00 UTC. This converter accepts negative values. As for privacy: everything on this page runs locally in your browser with built-in JavaScript. The timestamps and dates you enter are never sent to a server, logged or stored anywhere, and the page keeps working offline once loaded.