Tools
Sign InSign Up
Notifications 0
UNIX Epoch explained
Ashutosh Singh - July 17, 2026
Unix timestamps show up in logs, JWTs, databases, and APIs — and converting them by hand is a waste of time. This guide explains what the Unix epoch is, how seconds vs milliseconds differ, and how to convert epoch to date (and back) in every major language. When you need a fast answer, use the free Codeground Epoch Converter.
What is the Unix epoch?
The Unix epoch is January 1, 1970, 00:00:00 UTC. A Unix timestamp is the number of seconds (or milliseconds) that have elapsed since that moment. Timestamp 0 is the epoch itself. The value is timezone-independent: the same instant is the same number worldwide. Timezones only matter when you display a human-readable date.
Seconds vs milliseconds
Seconds — typically 10 digits today (e.g. 1727210565). Common in Unix, Go, many APIs.
Milliseconds — typically 13 digits (e.g. 1727210565000). Common in JavaScript Date.now() and many databases.
Paste either into the epoch converter — it auto-detects the unit. For the live clock, open Current Unix Time.
Epoch to IST, PST, GMT, AEST
Unix time is UTC-based. To show India Standard Time, pick Asia/Kolkata. For Pacific time, America/Los_Angeles. GMT/UTC and Australia/Sydney (AEST/AEDT) are available too. The converter applies the zone after decoding the timestamp.
Code snippets
JavaScript: new Date(unixSeconds * 1000)
Python: datetime.utcfromtimestamp(unixSeconds)
Go: time.Unix(unixSeconds, 0)
Java: Instant.ofEpochSecond(unixSeconds)
Difference between two timestamps
Need duration between two epochs? Use the Timestamp Diff calculator for seconds, minutes, hours, and days.
FAQ
Is an epoch converter free? Yes — Codeground’s runs in the browser with no signup.
What about epoch to human date? Paste the number; you get GMT, local, and any IANA timezone.
Where do I get the current epoch? current-unix-time updates live every second.