Skip to main content
UT

Unix Timestamp Converter

Convert a Unix timestamp to a readable date, or a date to a Unix timestamp — see both UTC and your local time at once.

Did you like the tool? Thanks!
Share:
Current timestamp


Enter a timestamp above, or a date below — both directions update independently and everything runs locally in your browser.

How to Use Unix Timestamp Converter

Paste a Unix timestamp into the top field to see it converted to a human-readable date — the tool auto-detects whether you pasted seconds or milliseconds by counting digits. Or pick a date and time in the bottom field to see the equivalent Unix timestamp. Every result is shown in both UTC and your browser's local timezone side by side, and a live "current timestamp" ticks in real time above both fields so you always have a reference point.

About Unix Timestamp Converter

A Unix timestamp (also called Epoch time or POSIX time) is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. It is the standard way computers store and exchange points in time internally, because a single integer is unambiguous, timezone-independent, and trivial to compare or sort — unlike a formatted date string, which depends on locale, format, and timezone assumptions that vary between systems. You will see Unix timestamps everywhere in software: API responses, server logs, database `created_at` columns, JWT expiry claims, cache expiry headers, and cookie `expires` values all commonly use them. There are two flavours in common use: seconds and milliseconds. Unix systems, cron, and most server-side languages (PHP's `time()`, Python's `time.time()` truncated) traditionally use seconds, giving a 10-digit number for dates in the current era (roughly 2001–2286). JavaScript's `Date.now()` and most browser and Node.js APIs use milliseconds, giving a 13-digit number for the same range. Pasting a 10-digit number into a tool expecting milliseconds — or vice versa — produces a wildly wrong date (either 1970 or a date thousands of years away), which is one of the most common timestamp bugs in web development. This tool sidesteps that by counting the digits of whatever you paste: 1–10 digits is treated as seconds, 11 or more digits as milliseconds, before running it through JavaScript's native `Date` object. The UTC/local split matters because a raw timestamp has no timezone of its own — it is an absolute instant, and "what time was it" only becomes meaningful once you pick a reference frame. Showing both columns side by side is deliberate: UTC is what you want when comparing logs across servers in different regions or writing timezone-agnostic documentation, while local time is what you want when explaining to a colleague or end user what a value means for them. `Intl.DateTimeFormat` with an explicit `timeZone: 'UTC'` option produces the first column; the same formatter with no `timeZone` override falls back to whatever timezone your browser (and therefore your operating system) is currently configured with for the second. Everything here is plain `Date` arithmetic — no date library, no server round-trip. `new Date(timestamp)` (after normalising to milliseconds) does the heavy lifting for the timestamp-to-date direction, and `Date.getTime()` divided by 1000 does the reverse for the date-to-timestamp direction, rounded down to the nearest whole second since Unix time is conventionally expressed in whole seconds.

Details & Tips

Auto-detection rule: the tool reads the digit count of the value you paste (ignoring a leading minus sign for timestamps before 1970). 1 to 10 digits is interpreted as seconds; 11 digits or more is interpreted as milliseconds. This threshold is chosen because 10-digit second timestamps top out around the year 2286, while millisecond timestamps for any date in the last 50 years already have at least 12 digits — there is no realistic overlap for dates people actually convert. Worked examples: • 1700000000 (10 digits, seconds) → Tue, 14 Nov 2023 22:13:20 UTC. • 1700000000000 (13 digits, milliseconds) → the same instant, pasted in millisecond form. • 0 → Thu, 1 Jan 1970 00:00:00 UTC, the Unix epoch itself. • -86400 → Wed, 31 Dec 1969 00:00:00 UTC — negative timestamps for dates before 1970 are supported and calculated correctly, since JavaScript's `Date` object accepts negative millisecond offsets natively. The "Year 2038 problem" is a related but separate issue: older systems that store a Unix timestamp in a signed 32-bit integer will overflow on 19 January 2038 at 03:14:07 UTC, wrapping around to a negative number and jumping back to 1901. This tool is unaffected — JavaScript numbers are 64-bit floating point, so timestamps are represented accurately for dates far beyond 2038 — but it is worth knowing about if you are debugging a system written in C, older PHP builds on 32-bit platforms, or embedded firmware that may still use 32-bit time_t. The date-to-timestamp direction uses an HTML `datetime-local` input, which is always interpreted by the browser in the machine's local timezone (there is no way to enter a UTC value directly in that control type) — the tool converts what you pick into both a UTC and local display so you can always confirm which instant you actually selected before copying the resulting timestamp elsewhere. Leap seconds are not modelled, in line with the Unix time standard itself, which defines every day as exactly 86,400 seconds and lets official leap seconds cause the rare repeated or skipped second in real-world civil time.

Frequently Asked Questions

What is a Unix timestamp?
It is the number of seconds (or milliseconds) that have elapsed since 00:00:00 UTC on 1 January 1970, known as the Unix Epoch. It is a timezone-independent way to represent a single point in time as a plain number.
How does the tool know if I pasted seconds or milliseconds?
It counts the digits in the number you paste. 10 digits or fewer is treated as seconds; 11 or more digits is treated as milliseconds. This covers every realistic timestamp for dates from the 1970s through the year 2286.
Why do I see two results — UTC and local time?
A timestamp has no timezone of its own; it is an absolute instant. UTC gives you a universal reference for comparing logs or servers in different regions, while local time shows what that instant means on your own device's clock.
Can I convert dates before 1970?
Yes. Enter a negative number as the timestamp and the tool converts it correctly — for example, -86400 seconds is 31 December 1969.
What is the "current timestamp" shown at the top?
A live value that updates every second, showing the Unix timestamp for right now in both seconds and milliseconds, so you always have a live reference point without needing to convert "now" manually.
What is the Year 2038 problem, and does it affect this tool?
Older systems that store timestamps as a signed 32-bit integer will overflow on 19 January 2038. This tool is unaffected because it uses JavaScript's 64-bit number type, which handles dates far beyond that date accurately.
Does this tool account for leap seconds?
No — and neither does the Unix time standard itself. Every day is treated as exactly 86,400 seconds, which is the standard convention used by virtually all computer systems.
Why does the date-to-timestamp field use my local timezone?
The browser's date/time picker always interprets the value you enter in your machine's local timezone — there is no way to type a UTC value directly into it. The tool shows you both the UTC and local equivalents afterwards so you can confirm the exact instant you picked.
Is my data sent to a server?
No. All conversions happen locally in your browser using JavaScript's built-in Date object — nothing you type is transmitted anywhere.
Does the timestamp round to the nearest second?
When converting a date to a timestamp, the result is expressed in whole seconds (rounded down), matching the conventional Unix timestamp format. Millisecond precision is preserved when converting a millisecond timestamp to a date.
What timestamp format do most APIs expect?
It varies — check the specific API's documentation. Server-side languages and cron traditionally use seconds (10 digits), while JavaScript and many JSON APIs use milliseconds (13 digits). This tool's auto-detection is a convenience for reading values, not a substitute for checking the format a system you're integrating with actually requires.

Part of These Collections

Also Available As

unix timestamp converter, epoch converter, epoch time to date, timestamp to date, date to timestamp, unix time converter, epoch calculator

Found a Problem?

Let us know if something with Unix Timestamp Converter isn't working as expected.

Thanks — we'll take a look.