About the Timestamp Converter
The Timestamp Converter translates Unix timestamps into human-readable dates and converts dates back into Unix time. Databases, log files, JWT tokens and APIs often store time as the number of seconds (or milliseconds) since 1 January 1970 UTC. A value like 1792540800 means nothing at a glance, but converted it shows an exact date and time you can reason about.
How to Use the Timestamp Converter
- Paste a Unix timestamp in seconds or milliseconds.
- Click Convert to see the date and time in UTC and in your local time.
- To go the other way, choose a date and time and convert it to a timestamp.
- Use the current timestamp shown on the page when you need “now” for testing.
Seconds vs Milliseconds
Unix time is traditionally counted in seconds and currently has 10 digits. JavaScript's Date.now(), Java and many front-end libraries use milliseconds, which have 13 digits. If a converted date lands in 1970 or thousands of years in the future, you have probably mixed up seconds and milliseconds: divide or multiply by 1000.
Why Developers Use Timestamps
A timestamp is a single number, so it is easy to store, sort and compare, and it has no time zone ambiguity because it is always based on UTC. Convert to local time only when you display it to a user. This avoids bugs around daylight saving time and users in different countries.
Getting a Timestamp in Code
JavaScript: Math.floor(Date.now() / 1000). C#: DateTimeOffset.UtcNow.ToUnixTimeSeconds(). Python: int(time.time()). PHP: time(). SQL Server: DATEDIFF_BIG(SECOND, '1970-01-01', SYSUTCDATETIME()). Linux shell: date +%s.
Frequently Asked Questions
What is the Unix epoch?
It is 00:00:00 UTC on 1 January 1970, the moment from which Unix time is counted.
What is the year 2038 problem?
Systems that store Unix time in a signed 32-bit integer overflow on 19 January 2038. Modern systems use 64-bit values and are not affected.
Does a timestamp include a time zone?
No. A Unix timestamp is always UTC. The time zone only matters when you display it.
How do I read the exp claim in a JWT?
The exp and iat claims are Unix timestamps in seconds. Paste them here, or use the JWT Decoder which converts them for you.