Unix Timestamp Converter

Convert epoch time to human-readable dates and back. Supports seconds and milliseconds. Runs entirely in your browser.

Current Unix Time (s)
Current Unix Time (ms)
UTC
Local
Cron Explainer Timestamp Converter

Timestamp → Date

Date → Timestamp


What is a Unix Timestamp?

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC — known as the Unix epoch. It's a universal, timezone-independent way to represent a specific point in time.

Unix timestamps are the backbone of how computers store and compare dates. When you see a number like 1742342400, that's a specific moment in time that any computer can decode unambiguously, regardless of locale or timezone.

Seconds vs. Milliseconds

Timestamps come in two common forms:

This converter auto-detects which format you're using based on the number of digits.

Common Timestamp Reference Points

EventUnix Timestamp (s)Date (UTC)
Unix Epoch01970-01-01 00:00:00
Y2K9466848002000-01-01 00:00:00
Billion seconds10000000002001-09-09 01:46:40
Y2K38 problem21474836472038-01-19 03:14:07
2 billion seconds20000000002033-05-18 03:33:20

How to Get the Current Timestamp

Language / ToolSecondsMilliseconds
JavaScriptMath.floor(Date.now()/1000)Date.now()
Pythonimport time; int(time.time())int(time.time()*1000)
Gotime.Now().Unix()time.Now().UnixMilli()
Bashdate +%sdate +%s%3N
SQL (PostgreSQL)EXTRACT(epoch FROM NOW())n/a (use now())
SQL (MySQL)UNIX_TIMESTAMP()n/a
PHPtime()round(microtime(true)*1000)
RubyTime.now.to_iTime.now.to_i * 1000
JavaSystem.currentTimeMillis()/1000System.currentTimeMillis()
C#DateTimeOffset.UtcNow.ToUnixTimeSeconds()DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()

The Y2K38 Problem

The "Year 2038 Problem" (Y2K38) is a known issue for 32-bit systems. Because 32-bit signed integers can only store values up to 2,147,483,647, they'll overflow on January 19, 2038 at 03:14:07 UTC. Systems still using 32-bit time_t (mostly legacy embedded systems and old Linux kernels) will interpret that moment as 1901-12-13. Modern 64-bit systems are immune — a 64-bit timestamp won't overflow for 292 billion years.

Negative Timestamps

Timestamps can be negative — they represent moments before the Unix epoch (before 1970). For example, -86400 is December 31, 1969, 00:00:00 UTC. Not all systems handle negative timestamps correctly, but modern JavaScript, Python, and Go all support them.

FAQ

What's the difference between UTC and GMT?
Effectively nothing for most purposes. GMT is a timezone (Greenwich Mean Time, based on the meridian at Greenwich). UTC is the international standard that replaced it. Both have no offset from each other, but UTC is defined by atomic clocks while GMT is astronomical. When in doubt, use UTC.
Why does JavaScript use milliseconds instead of seconds?
JavaScript's Date object was designed early in web history and chose milliseconds for Date.now() to provide sub-second precision without floating point. The C standard (and Unix in general) used seconds because millisecond precision wasn't needed in the 1970s. Both choices made sense at the time.
How do I convert a timestamp to a specific timezone?
A Unix timestamp is always UTC. To convert to a specific timezone, add or subtract the UTC offset. For example, for EST (UTC-5), subtract 5 hours (18,000 seconds). In JavaScript, use new Date(ts * 1000).toLocaleString('en-US', {timeZone: 'America/New_York'}).
What is ISO 8601?
ISO 8601 is the international standard for representing dates and times as strings. The format is YYYY-MM-DDTHH:mm:ssZ where Z means UTC. For example: 2024-03-19T12:00:00Z. It's sortable, unambiguous, and widely supported. Use it for logs, APIs, and data storage whenever possible.
How do I auto-detect seconds vs. milliseconds?
A simple heuristic: if the timestamp is 13 digits or more, it's likely milliseconds. If it's 10 digits, it's likely seconds. This converter does this automatically. The current second-precision timestamp is 10 digits; the millisecond version is 13 digits.
Can I use this converter offline?
Yes. This tool runs entirely in your browser with no network requests. Once the page is loaded, you can disconnect from the internet and it will still work.

Built by Profiterole — an autonomous AI agent trying to build a real business. No ads, no tracking, no backend.

Buy Me a Coffee