Unix Timestamp Converter
Guide: Unix Timestamps Explained
Nothing you enter or choose here leaves your device. This tool runs in your browser.
Reference points
A Unix timestamp counts the seconds since midnight UTC on 1 January 1970. These values are worth recognizing:
| Timestamp | UTC date and time | Why it matters |
|---|---|---|
0 | 1 January 1970, 00:00:00 | The start. Shows up when a date is missing or null |
1000000000 | 9 September 2001, 01:46:40 | The billionth second |
1700000000 | 14 November 2023, 22:13:20 | A handy mid-range sample |
2147483647 | 19 January 2038, 03:14:07 | The limit for signed 32-bit systems |
Seconds, milliseconds and beyond
The same moment can be written four ways, and the length gives it away. The tool detects the unit from the size of the number, and you can override it if the guess is wrong.
| Digits (today) | Unit | Where you'll see it |
|---|---|---|
| 10 | Seconds | Unix tools, many APIs, JWT claims |
| 13 | Milliseconds | JavaScript's Date.now(), Java |
| 16 | Microseconds | Some databases and Python logs |
| 19 | Nanoseconds | Go, high-resolution tracing |
The classic bug is a mix-up between the first two. Give a milliseconds value to something expecting seconds and you get a date tens of thousands of years away. Give seconds to something expecting milliseconds and you get a day in January 1970.
Reading the three results
Every conversion shows UTC, your own zone and a third zone of your choice. UTC is the same for everyone, so it's the one to put in a bug report. Your own zone is what a person would see on their screen, and the third lets you check what a colleague in another city will see. Daylight saving is applied for the chosen date, not for today.
Going the other way
Type a date and time and pick the zone it's in to get the timestamp. Be careful about that zone: 09:00 in New York and 09:00 in Lagos are five hours apart and have different timestamps. If a script produces a result that's off by a whole number of hours, the zone is the first suspect.
Getting the current timestamp in code
JavaScript Math.floor(Date.now() / 1000) seconds
Date.now() milliseconds
Python int(time.time()) seconds
Shell date +%s seconds
SQL (MySQL) UNIX_TIMESTAMP() secondsWhat a timestamp can't tell you
- The time zone. It's always UTC underneath. Where the event happened has to be stored separately.
- Leap seconds. Unix time pretends they don't exist, so every day has exactly 86,400 seconds.
- Dates before 1970. These are negative numbers. Many systems handle them, and some don't.
For the year 2038 problem and how time zones tangle with stored dates, read the guide to time zones, UTC and daylight saving. Scheduling tasks? The cron explainer shows run times in UTC and local time.
Debugging with timestamps
- Count the digits first. Ten means seconds and thirteen means milliseconds.
- Convert to UTC and compare with another log line. If two systems disagree by a whole number of hours, one of them is using local time.
- Check whether the value is in the past or the future. Tokens and cache entries with an expiry in the past are the usual cause of sudden failures.
- If the date is in 1970, the value is probably zero, null or seconds read as milliseconds.
- If the date is thousands of years ahead, milliseconds were read as seconds.
Written by Akinrinmade Michael · Updated October 24, 2026
How to use
- 1Paste a Unix timestamp. The unit (seconds, milliseconds and so on) is detected for you.
- 2Read the date in UTC, your own time zone and any zone you choose.
- 3To go the other way, type a date and time and pick its time zone.
- 4Click Copy next to any value.
Frequently asked questions
What is a Unix timestamp?
It is the number of seconds since 1 January 1970 at 00:00:00 UTC, also called epoch time. JavaScript and many APIs use milliseconds instead.
How does it tell seconds from milliseconds?
By size. Numbers below about 100 billion are read as seconds, up to 100 trillion as milliseconds, then microseconds and nanoseconds. You can override the unit.
Does it handle time zones and daylight saving?
Yes. Dates are shown with the correct offset for the chosen zone on that day, including daylight saving time.
What is the year 2038 problem?
Systems that store the timestamp in a signed 32-bit integer overflow on 19 January 2038. 64-bit timestamps, as used here, are fine for billions of years.
Read the guides
Learn how this works and how to get the most from it.
Developer
Unix Timestamps Explained
What a Unix timestamp is, the difference between seconds and milliseconds, how time zones fit in, and the Year 2038 problem.
3 min read
Developer
How to Read a Cron Expression (With Examples)
Learn what the five fields of a cron expression mean, how */5 and 1-5 work, and see common schedules explained clearly.
4 min read
Money, health & time
Time Zones, UTC and Daylight Saving: A Practical Guide
Why time zones cause bugs and missed meetings, what UTC is, how daylight saving shifts things, and rules for working across zones.
4 min read
Security
How to Decode a JWT and Read Its Claims
A JSON Web Token has three parts. Learn what each part holds, what exp and iat mean, and why decoding a token isn't the same as trusting it.
3 min read
Related tools
World Clock & Time Zone Converter
See the time around the world and convert meeting times.
Date Calculator
Count the days between dates or add and subtract time from a date.
Cron Expression Explainer
Explain a cron schedule in plain English and see its next run times.
UUID & Random Number Generator
Generate secure UUIDs (v4, v7) and random numbers.