Unix Timestamp Converter

Convert a unix timestamp (epoch time) to a readable date in UTC and your local timezone — or turn any date back into a timestamp. The current epoch time ticks live below.

Current Unix Timestamp (now)
 
Try:

Convert Date & Time to Unix Timestamp

What Is a Unix Timestamp?

A unix timestamp is a count of seconds since midnight UTC on January 1, 1970. That's it — one number, no timezone, no format quirks. The starting point is called the Unix epoch, which is why you'll also see the terms epoch time and POSIX time used interchangeably with unix time.

The 1970 date wasn't chosen for any deep reason. Early Unix engineers at Bell Labs needed a convenient recent starting point that fit in a 32-bit number, and the start of the decade was tidy. Fifty-odd years later that arbitrary choice sits underneath nearly every database, API, log file, and operating system you touch. Your JWT's expiry claim? A unix timestamp. The created_at field in that API response? Same. File modification times on Linux? Also unix time.

The catch is that 1721001600 means nothing to a human. If you've ever squinted at a number like that in a log file trying to work out whether it's from yesterday or last March, this page is for you: paste it in, get the date in UTC and your own timezone.

How the Converter Works

Paste a timestamp into the field above and the result appears as you type. You get the date in UTC, in your local timezone (detected from your browser), in ISO 8601 format, plus a relative reading like "3 hours ago" as a sanity check. If the relative time says "54 years ago", you've probably pasted milliseconds as seconds — more on that below.

The reverse direction works too. Pick a date and time in the second section and you'll get the matching unix timestamp in both seconds and milliseconds. There's a checkbox to treat your input as UTC rather than local time, which matters more often than you'd think — "midnight on the 1st" is a different timestamp in Tokyo than in New York.

Everything runs in your browser with plain JavaScript date functions. Your timestamps never leave your machine.

Unix Timestamp Now

The clock at the top of the page shows the current unix timestamp, updating every second. Click the number to copy it. Handy when you're testing token expiry, seeding a database, or just need "now" in epoch form without opening a terminal. (If you do have a terminal open, date +%s gets you the same thing.)

Seconds or Milliseconds? The Classic Mix-Up

Unix time comes in two flavors and confusing them is probably the single most common timestamp bug. Unix itself, Linux, PHP, Python's time.time(), and most SQL databases count seconds. JavaScript's Date.now() and a lot of web APIs count milliseconds. Feed a millisecond value into something expecting seconds and your date lands in the year 56,000-something; do the opposite and everything happened in January 1970.

The quick tell: right now, a timestamp in seconds is 10 digits long and one in milliseconds is 13. This converter checks the length and auto-detects the unit, but you can force either one from the dropdown if you're working with unusual values.

Why Convert to UTC First?

Unix time is defined against UTC, so the UTC reading is the "true" value — every local time is just UTC shifted by an offset that changes with daylight saving. When you're comparing server logs across regions or debugging an API with a teammate nine timezones away, agreeing on the UTC value first avoids the whole class of "wait, is that your 3pm or mine?" confusion. That's why this tool always shows UTC at the top of the results, with your local time right underneath.

A Few Timestamps Worth Knowing

  • 0 — the epoch itself: January 1, 1970, 00:00:00 UTC.
  • 1000000000 — one billion seconds, reached on September 9, 2001. Unix enthusiasts actually threw parties for this one.
  • 1234567890 — February 13, 2009. Another nerd holiday.
  • 2147483647 — January 19, 2038, 03:14:07 UTC. The largest value a signed 32-bit integer can hold, and the moment old systems hit the Year 2038 problem: one second later a 32-bit counter overflows and wraps around to 1901. Think Y2K, but for unix time. Modern 64-bit systems are fine; a lot of embedded hardware isn't.

You can click any of these under the input field above to see them converted.

Frequently Asked Questions

What is a unix timestamp?

A unix timestamp is the number of seconds that have passed since midnight UTC on January 1, 1970 (the "Unix epoch"). It ignores leap seconds. You will also hear it called epoch time, POSIX time, or just unix time. Because it is a plain integer with no timezone attached, computers use it everywhere: databases, log files, APIs, and file systems.

How do I convert a unix timestamp to a date?

Paste the number into the converter on this page. It reads the timestamp, works out whether it is in seconds or milliseconds, and shows the matching date and time in UTC, in your own timezone, and in ISO 8601 format. Everything runs in your browser, so nothing is uploaded anywhere.

Is a unix timestamp in seconds or milliseconds?

Both exist, which is exactly why people get burned. Unix, Linux, PHP, Python and most databases count in seconds. JavaScript counts in milliseconds. A quick rule of thumb: a current timestamp in seconds has 10 digits, in milliseconds it has 13. This converter checks the digit count and picks the right unit for you, though you can override it.

What is the current unix timestamp?

The live clock at the top of this page shows the current unix timestamp, ticking up once per second. Click the number to copy it. In code you can get the same value with time.time() in Python, Date.now() in JavaScript (milliseconds), or date +%s in a terminal.

Can a unix timestamp be negative?

Yes. Negative values count backwards from January 1, 1970. For instance, -86400 is exactly one day before the epoch, so December 31, 1969 at midnight UTC. Dates of birth from before 1970 stored as unix time are negative numbers.

What is the Year 2038 problem?

Old systems store unix time in a signed 32-bit integer, which maxes out at 2147483647. That timestamp corresponds to January 19, 2038 at 03:14:07 UTC. One second later, a 32-bit counter overflows and wraps to a date in 1901. Modern 64-bit systems are not affected, but plenty of embedded devices still are.

Working across timezones rather than just UTC and local? Our Timezone Converter handles that.

Feedback? Need help?