How to convert a Unix timestamp
- 1For the Unix time now, check the Current Time panel at the top. It shows the live timestamp in seconds and milliseconds, with a copy button for each.
- 2To convert a timestamp to date and time, paste it into the Unix Timestamp field under Unix → DateTime, or click Now, Start of Day or Start of Year to fill one in.
- 3Check the badge to see whether it was read as Seconds or Milliseconds, then copy the ISO 8601, UTC, Local, Date, Time or Relative value you need.
- 4To go the other way, pick a date and time in the Date & Time field under DateTime → Unix, or click Set to Now, and copy the result in seconds or milliseconds.
What Unix time actually is
Unix time, also called epoch time or POSIX time, counts the seconds elapsed since 00:00:00 UTC on January 1, 1970, the Unix epoch. It's a single integer with no timezone attached, which makes it easy to store, compare and sort. The timestamp 1700000000 refers to the same instant in Tokyo and in New York; only the way it's displayed changes. That's why databases, log formats and APIs lean on it so heavily, and why an epoch converter is something you end up reaching for whenever you read them.
The most common mix-up is units. Unix tools, most languages' standard libraries and JWT claims use seconds, which is currently a 10-digit number. JavaScript's Date.now(), Java's System.currentTimeMillis() and many JSON APIs use milliseconds, a 13-digit number. Feed milliseconds into something expecting seconds and you land tens of thousands of years in the future; do the reverse and you get a date in January 1970. This converter treats any value whose magnitude is above 1,000,000,000,000 as milliseconds and anything smaller as seconds, and tells you which it picked.
Unix time also ignores leap seconds. Every day is treated as exactly 86,400 seconds, so the count drifts slightly from true elapsed time but stays simple to calculate with. For almost all application code that's exactly what you want.
Finally, there's the year 2038 problem. Systems that store Unix time as a signed 32-bit integer overflow at 2147483647, which is 03:14:07 UTC on January 19, 2038. After that the value wraps to a negative number and reads as December 1901. Modern platforms use 64-bit time, but old embedded devices, file formats and database columns declared as 32-bit INT still carry the bug.
When developers reach for it
Reading logs and database rows
Convert epoch to date for a created_at or ts value from a log line or table, and see it in both UTC and your local time.
Checking token expiry
JWT exp and iat claims are Unix time in seconds. Convert Unix time to date to confirm when a token or cache entry really expires.
Writing test fixtures
Pick a specific date and time and copy its epoch value in seconds or milliseconds for a test or seed script.
Spotting unit bugs
If a date shows up as 1970 or the year 50000, paste the value here to confirm whether it's seconds or milliseconds.
Frequently asked questions
What is a Unix timestamp?
+
It's the number of seconds since 00:00:00 UTC on January 1, 1970. It identifies a single moment in time regardless of timezone.
How do I tell if a timestamp is in seconds or milliseconds?
+
Count the digits: current times are 10 digits in seconds and 13 in milliseconds. This converter treats values above 1,000,000,000,000 as milliseconds and shows a Seconds or Milliseconds badge so you can confirm. To convert milliseconds to date, paste the 13-digit value as is; there's no need to divide by 1,000 first.
How do I convert a date to Unix timestamp format?
+
Use the DateTime → Unix section. Pick a date and time, which is read in your browser's local timezone, or click Set to Now, then copy the result in seconds or milliseconds.
Is epoch time the same as Unix time?
+
Usually, yes. Both mean seconds since 1970-01-01 00:00:00 UTC, so an epoch time converter and a Unix time converter do the same job. Some systems count from a different epoch, though: Windows FILETIME starts in 1601, NTP in 1900 and GPS time in 1980. This tool only uses the Unix epoch, so convert those values first.
Does Unix time depend on my timezone?
+
No. The timestamp is always counted from the epoch in UTC. Only the human-readable display changes, which is why the tool shows both a UTC and a Local version.
What is the year 2038 problem?
+
Signed 32-bit integers can't store Unix times past 2147483647, which is 03:14:07 UTC on January 19, 2038. Systems still using 32-bit time will overflow at that moment.
Do Unix timestamps include leap seconds?
+
No. Unix time assumes every day has exactly 86,400 seconds, so leap seconds are not counted.
Can I convert dates before 1970?
+
Yes. Enter a negative timestamp: -86400 is December 31, 1969, and -2208988800 is January 1, 1900, the earliest date the converter accepts. Most languages and databases handle negative Unix times the same way.
Related tools
Time Zone Converter
Convert date and time between timezones. Compare multiple zones side by side with live mode and DST detection.
JWT Decoder
Decode and inspect JWT tokens instantly. View header, payload, signature, expiration status, and time claims.
Binary, Hex & Decimal Converter
Convert numbers between binary, octal, decimal, and hexadecimal. Real-time conversion with input validation and BigInt precision for large values.