What Is a Unix Timestamp and How to Convert One
Almost every backend system stores dates as a single number in logs, databases, and APIs — that number is called a Unix timestamp (or epoch time). If you've ever seen something like '1735689600' in a database and been confused, this guide is for you.
What a Unix timestamp actually is
It's the count of seconds (sometimes milliseconds) that have passed since 1 January 1970, 00:00:00 UTC — known as the 'epoch'. It carries no timezone information — a timestamp is always UTC-based, and only gets converted to a local timezone at display time.
Why this format is so popular
- It's a single number — avoids all the bugs that come with parsing date strings (formats, locales)
- Sorting and comparing is trivial — just compare numbers
- Compact storage — one integer, smaller than a full date string
- Timezone-independent — the source of truth stays the same even if server and client are in different timezones
The common mix-up: seconds vs milliseconds
JavaScript's Date.now() returns milliseconds, while a Unix timestamp is traditionally in seconds. If your date shows up wildly wrong (like 1970, or the year 50000+), there's a 99% chance you mixed up seconds and milliseconds — check by multiplying or dividing by 1000.
No need to calculate this by hand while debugging — paste the number into our Timestamp Converter and get an instant human-readable date (in your local timezone), and it works the other way round too.
Try it yourself
Timestamp Converter