About the Unix Timestamp Converter
What is a Unix timestamp?
A Unix timestamp is the number of seconds that have passed since midnight UTC on 1 January 1970, and it ignores leap seconds. That single number is the whole idea. There is no time zone baked into it, no formatting to argue about, and no ambiguity about whether 03/04 means March or April. Two timestamps can be compared with a greater-than sign. You will also see it called epoch time, POSIX time, or just Unix time, and all four names mean the same thing.
The catch is that a bare number tells you almost nothing at a glance. Is 1754400000 seconds or milliseconds? Is 133000000000000000 nanoseconds or a Windows FILETIME? We rebuilt this converter in 2026 around that problem. Paste anything and it names what it thinks the value is, then shows you the same instant in every format we could find a use for, from Unix seconds to ISO 8601 to the tick counts that Windows and .NET keep. No sign-up, nothing uploaded, and no separate page for each format.
How to Use This Tool
- Paste a timestamp or type a date into the box at the top.
1754400000, 1754400000000, 2026-08-05 14:30, August 5, 2026, Wed, 05 Aug 2026 14:30:00 GMT and even now or +3 days all work.
- Check the line under the box. It says how the number was read, and if the digit count was misleading you can pick the real format from the dropdown instead.
- Set the time zone. Every written format and the world table move with it, while the Unix numbers stay the same, because they never had a zone in the first place.
- Click the copy button on any card to take that one format, or use Copy every format to grab the lot.
- Switch to Date to timestamp to go the other way, one field at a time, with daylight saving handled properly.
- Switch to Convert a list to paste a whole column of timestamps out of a log or a spreadsheet and get a table back, which you can download as CSV.
Common Use Cases
Timestamps turn up wherever software needs to record when something happened, so the reasons for converting one vary a lot.
- Reading a log file. A line says
1754400000 and you need to know whether that was during the incident or three hours before it.
- Debugging an API. A JSON payload has
exp or iat in it and you want to know whether the token has already expired.
- Writing a database query. You need the timestamp for the start of last Tuesday to put in a WHERE clause.
- Checking a cookie or a JWT. Both store expiry as epoch seconds. Our JWT decoder pulls those fields out for you.
- Forensics and incident response. Windows event logs, Chrome history and Active Directory all use different epochs, and this page reads and writes all of them.
- Migrating data between systems. One side stores seconds, the other milliseconds, and being off by a factor of a thousand puts every record in 1970.
- Scheduling. You know the instant you want a job to run and need it as a number a script can compare against.
How many digits should a timestamp have?
This is the fastest way to tell what unit you are looking at. The digit counts below are for dates in the current era, roughly 2001 through 2286.
FILETIME and .NET ticks are both 18 digits, which is why this tool lets you name the format instead of relying on the guess. A .NET tick count is always the larger of the two for the same date, because it starts counting 1,600 years earlier.
Handy timestamps to know
Getting the current timestamp in code
Every language has a one-liner. These all return seconds unless the name says otherwise.
PHP
$seconds = time();
$millis = (int) (microtime(true) * 1000);
$date = date('Y-m-d H:i:s', 1754400000);
JavaScript
const millis = Date.now();
const seconds = Math.floor(Date.now() / 1000);
const date = new Date(1754400000 * 1000).toISOString();
Python
import time, datetime
seconds = int(time.time())
date = datetime.datetime.fromtimestamp(1754400000, datetime.timezone.utc)
Java
long seconds = Instant.now().getEpochSecond();
long millis = System.currentTimeMillis();
Instant date = Instant.ofEpochSecond(1754400000L);
Go
seconds := time.Now().Unix()
nanos := time.Now().UnixNano()
date := time.Unix(1754400000, 0).UTC()
C#
long seconds = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
long millis = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
var date = DateTimeOffset.FromUnixTimeSeconds(1754400000).UtcDateTime;
Ruby
seconds = Time.now.to_i
date = Time.at(1754400000).utc
Rust
use std::time::{SystemTime, UNIX_EPOCH};
let seconds = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs();
MySQL
SELECT UNIX_TIMESTAMP();
SELECT FROM_UNIXTIME(1754400000);
PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::bigint;
SELECT TO_TIMESTAMP(1754400000) AT TIME ZONE 'UTC';
SQL Server
SELECT DATEDIFF(SECOND, '1970-01-01', GETUTCDATE());
SELECT DATEADD(SECOND, 1754400000, '1970-01-01');
SQLite
SELECT strftime('%s', 'now');
SELECT datetime(1754400000, 'unixepoch');
Bash
date +%s
date -d @1754400000 -u
date -r 1754400000 -u # macOS and BSD
PowerShell
[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()
[DateTimeOffset]::FromUnixTimeSeconds(1754400000).UtcDateTime
Excel
=(A1/86400)+25569 ' timestamp in A1 to a date serial
=(A1-25569)*86400 ' date serial in A1 back to a timestamp
Frequently Asked Questions
How do I convert a Unix timestamp to a date?
Paste the number into the box at the top of this page. The tool works out whether it is seconds, milliseconds, microseconds or nanoseconds from the digit count, then shows the date in UTC, in the zone you pick, and in ISO 8601, RFC 2822 and SQL formats at the same time. In code, most languages take the seconds directly: date('Y-m-d H:i:s', $ts) in PHP, new Date(ts * 1000) in JavaScript, datetime.fromtimestamp(ts) in Python.
What is the current Unix timestamp?
It is at the top of this page, ticking once a second, and there is a copy button next to it. As of the moment you loaded this page it was roughly 1.75 billion, and it goes up by 86,400 every day. If you want it in code, time() in PHP, Date.now()/1000 in JavaScript, and date +%s in a shell all give you the same number.
Is a Unix timestamp in seconds or milliseconds?
Count the digits. Ten digits is seconds and covers any date up to the year 2286. Thirteen digits is milliseconds, which is what JavaScript and Java produce. Sixteen is microseconds and nineteen is nanoseconds. Getting this wrong is the most common timestamp bug there is, and the symptom is unmistakable: treat milliseconds as seconds and every date lands in the year 57,000, while treating seconds as milliseconds puts everything in January 1970.
Does a Unix timestamp have a time zone?
No, and that is the point of it. A timestamp counts seconds from a fixed instant in UTC, so the same number means the same moment everywhere on the planet. The time zone only enters the picture when you turn that number into a readable date, which is why changing the zone dropdown above moves the written formats but leaves the Unix numbers alone. If you need to compare wall clock times across cities, our time zone converter is built for that.
What is the year 2038 problem?
Systems that store a timestamp in a signed 32-bit integer run out of room at 03:14:07 UTC on 19 January 2038, because 2147483647 is the largest value that fits. The next second wraps around to a negative number, which reads as December 1901. Sixty-four-bit systems are fine for another 292 billion years, but the problem is still live in embedded devices, old database schemas and file formats. MySQL's TIMESTAMP column hits the same wall, while DATETIME does not. The bar on this page shows you which side of that line a value sits on.
Can a Unix timestamp be negative?
Yes. Anything before 1970 is a negative number, so the moon landing on 20 July 1969 is roughly -14,182,940. Plenty of software handles this correctly, but plenty does not: unsigned database columns reject it outright, and some older date libraries return garbage rather than an error. If you are storing historical dates, test the edge before you commit to a schema.
What is the difference between epoch time and Unix time?
Nothing. Epoch time, Unix time, Unix timestamp and POSIX time are four names for the same count of seconds since 1 January 1970. Strictly speaking an epoch is just any chosen starting point, and other systems pick different ones, which is why Windows counts from 1601 and .NET counts from the year 1. When someone says "epoch time" without qualifying it, they mean the 1970 one.
Why does my timestamp show a date in 1970?
Almost always because a millisecond value was handed to something expecting seconds, or because a null or an empty string got converted to zero along the way. A timestamp of 0 is exactly midnight on 1 January 1970 UTC, so a screen full of that date usually means the value never arrived rather than that the date is wrong. Check the digit count first, then check whether the field was ever populated.
Does Unix time count leap seconds?
No. Unix time pretends every day is exactly 86,400 seconds long, so when a leap second is inserted the same timestamp value is used twice or the clock is smeared across a few hours, depending on the system. This means Unix time is not a true count of elapsed SI seconds since 1970, and the gap is currently 27 seconds. For almost everything this does not matter. For GPS, astronomy and high-frequency trading it very much does, which is why the GPS value on this page runs 18 seconds ahead.
Is anything I paste sent to your server?
No. Every conversion on this page runs in JavaScript in your browser, so a timestamp out of a private log stays on your machine. There is no upload, no account and no logging of what you type. If you want to do arithmetic on dates rather than convert them, try our time calculator.