Epoch & Unix Timestamp Converter
Convert Unix timestamps to human-readable dates — fast and free.
The current Unix epoch time is
— Seconds since 1970-01-01 00:00:00 UTC.
Convert timestamp to human date
Convert human date to timestamp
What is Unix epoch time?
Unix epoch time — also called Unix time, POSIX time, or a Unix timestamp — is a single number that represents a specific moment in physical time. It is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. Almost every operating system, programming language, and database supports it natively, which is why it is the de facto standard for storing and exchanging timestamps between systems.
The number is timezone-agnostic on the wire: a server in Tokyo and a phone in Oslo recording the same instant will both produce the same Unix integer, even though the calendar clocks on either side read very different things. The conversion to a human-readable date only happens when something — a converter, a logging library, a date picker — applies a timezone and a calendar to render the number into year-month-day-hour-minute-second.
How this converter works
The tool above does three things, all entirely in your browser. Nothing you type leaves your device.
- Live current epoch. The big number at the top updates every second and shows the current Unix time. Click Copy to put it on your clipboard.
- Timestamp → human date. Paste any number — seconds, milliseconds, microseconds, or nanoseconds — and the converter auto-detects the unit by magnitude. It renders the result in your local timezone, in UTC, as ISO 8601, and as a relative time ("5 minutes ago", "in 3 days").
- Human date → timestamp. Pick a date and time, choose whether you mean local time or UTC, and the converter produces the corresponding Unix integer in seconds.
Picking the right unit: seconds, milliseconds, or microseconds?
The Unix specification says seconds, but different ecosystems have drifted. JavaScript's
Date.now() returns milliseconds. PostgreSQL stores microseconds internally. Go's
UnixNano() returns nanoseconds. When you copy a value from one system into
another, the unit can shift — and the resulting "date" will be off by exactly a factor of
1,000.
The converter handles this for you. If you paste a 10-digit number, it assumes seconds. A 13-digit number is milliseconds. 16 digits is microseconds. 19 digits is nanoseconds. The ranges are wide enough that any real-world timestamp from the last 50 years and the next 50 years will be classified correctly.
For the deeper version of this — including how to pick a unit for your own systems — see the seconds vs milliseconds guide.
Common use cases
A few of the situations developers find themselves needing this tool:
- Decoding a JWT. The
iat(issued at) andexp(expiry) claims in a JSON Web Token are Unix seconds. Pasting them here is faster than reaching for a CLI. - Reading a database log. Postgres, MySQL, and most logging pipelines emit Unix timestamps in their machine-readable output. The converter renders them into something a human can scan.
- Debugging a cron schedule. When a scheduled job stamps its run time as Unix seconds, the converter tells you whether the job is firing when you expect.
- Working across timezones. "What time is 1745301600 in New York?" is a one-paste question.
- Cache TTL math. "Will this token expire in the next hour?" — paste the expiry, and the relative-time output gives you the answer at a glance.
Getting the current epoch in your code
Every modern language has a one-liner for "now as a Unix timestamp". A short reference:
- Shell:
date +%s - JavaScript:
Math.floor(Date.now() / 1000) - TypeScript:
Math.floor(Date.now() / 1000) - Python:
int(time.time()) - PHP:
time() - Go:
time.Now().Unix() - Rust:
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() - Java:
Instant.now().getEpochSecond() - C#:
DateTimeOffset.UtcNow.ToUnixTimeSeconds() - Postgres:
SELECT EXTRACT(EPOCH FROM NOW())::bigint; - MySQL:
SELECT UNIX_TIMESTAMP();
For the full version with code for converting from a date string back to a Unix integer in each language, see Unix epoch in every language.
Going deeper
If you find yourself touching Unix timestamps in production code, a few of the rough edges to know about:
- The Year 2038 problem — what happens when a signed 32-bit timestamp overflows, and where it still bites.
- Timezones, UTC, and Unix time — the timezone bugs that catch developers most often, and how to avoid them.
- ISO 8601 vs Unix timestamps — when each format is the right choice for an API, a database, or a log file.
- Unix timestamps in JavaScript — the
practical playbook for working with
Datewithout writing bugs. - Unix timestamps in SQL — Postgres, MySQL, and SQLite reference for converting and storing.
The full guides index has eight long-form articles in total.