If you have ever looked at a database record, a JWT token, or a log file, you have probably seen a number like 1713542400 sitting in a date field. That is a Unix timestamp — and once you understand what it is, you will see it everywhere in software development.
This guide explains what Unix timestamps are, why they are used instead of readable date strings, and how to convert between the two — without writing any code.
What Is the Unix Epoch?
The Unix epoch is a fixed reference point in time: January 1, 1970 at 00:00:00 UTC. A Unix timestamp is simply the number of seconds that have passed since that moment. So 1713542400 means 1,713,542,400 seconds after January 1, 1970 — which works out to April 19, 2024 at 16:00 UTC.
This is also called epoch time, POSIX time, or Unix time. All four terms refer to the same thing.
Why Do Systems Use Timestamps?
- Timezone-safe — a timestamp is always the same integer regardless of where the server or user is located. "April 19 at 4pm" depends on which timezone;
1713542400does not. - Easy to compare — to check if event A happened before event B, just compare two integers.
- Compact storage — a 32-bit integer is far smaller than a formatted date string.
- Universal — every programming language and database has built-in functions to handle Unix timestamps.
Seconds vs Milliseconds — A Common Source of Bugs
Most Unix timestamps are in seconds (10 digits). JavaScript's Date.now() returns milliseconds (13 digits). This mismatch causes a very common bug: if you treat a millisecond timestamp as seconds, the resulting date will be in the year 55,000+.
Step-by-Step: Convert a Unix Timestamp to a Date
Go to webtoolsz.com/epoch-converter. No sign-up needed.
Enter the Unix timestamp in the input field. The tool detects seconds vs milliseconds automatically.
The tool shows the date and time in UTC and your local timezone instantly.
You can also go the other direction — enter a date and time and get the Unix timestamp for it.
Timestamp Math You Will Actually Use
- 1 minute = 60 seconds
- 1 hour = 3,600 seconds
- 1 day = 86,400 seconds
- 1 week = 604,800 seconds
- 30 days = 2,592,000 seconds
To find a timestamp 7 days from now, add 604,800 to the current timestamp. This is how expiry times are set in JWTs, session tokens, and cache headers.
Convert Any Timestamp Instantly — Free
Paste a Unix timestamp and get a readable date. Or enter a date and get its timestamp. No account needed.
Open Epoch ConverterFrequently Asked Questions
What is epoch time / Unix timestamp?
A Unix timestamp is the number of seconds (or milliseconds) that have elapsed since 00:00:00 UTC on January 1, 1970 — known as the Unix epoch. It is a single integer that represents any point in time, making it ideal for storing and comparing dates across systems.
Why do systems use Unix timestamps instead of readable dates?
Timestamps are timezone-agnostic integers — they are the same value regardless of where in the world the server or user is located. Readable date strings depend on locale, timezone, and format conventions, which causes bugs when systems in different regions exchange data.
How do I convert a Unix timestamp to a human-readable date?
Use the Epoch Converter tool at webtoolsz.com/epoch-converter. Paste the timestamp and it instantly shows the date and time in UTC and local time. In code: new Date(timestamp * 1000).toISOString() in JavaScript, or datetime.fromtimestamp(ts) in Python.
What is the difference between seconds and milliseconds timestamps?
Most Unix timestamps are in seconds (10 digits, e.g. 1713542400). JavaScript Date.now() returns milliseconds (13 digits, e.g. 1713542400000). If your date conversion looks wildly wrong — like showing year 55000 — you are likely treating a millisecond timestamp as seconds. Divide by 1000.