Time

Unix Timestamp Converter

Convert epoch timestamps, dates, and time units instantly.

Current Unix Timestamp

Common Timestamp Examples

Click any timestamp to see it converted instantly. Perfect for debugging, testing, or converting specific dates.

Timestamp → Date

Convert Unix timestamp to readable format

Date → Timestamp

Convert date to Unix timestamp

Time Unit Converter

Convert seconds to other units

Epoch Calculator

Get timestamps for boundaries

Start of Day

1789344000

End of Day

1789430399

Start of Month

1788220800

End of Month

1790812799

Start of Year

1767225600

End of Year

1798761599

What a Unix timestamp actually is

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 — the Unix epoch. It packs a complete, unambiguous moment in time into a single integer: no month names, no date formats, no daylight-saving rules, no timezone field to get wrong.

That is why databases, APIs, log files, and operating systems all lean on it. Integers are compact to store, trivial to sort and compare, and identical on every system in the world. The timestamp 1755216000 means exactly the same instant in Tokyo, Berlin, and São Paulo — only the human-readable rendering differs.

The flip side is that a raw timestamp is unreadable, which is where a converter earns its keep: paste a number out of a log line or a database row and see the moment it refers to, in both your local timezone and UTC.

Converting a timestamp to a date

Paste any epoch value into the Timestamp → Date converter. The tool detects the unit automatically: a 10-digit number is read as seconds and a 13-digit number as milliseconds, which is the difference between a Unix timestamp from a backend system and one produced by JavaScript’s Date.now(). You get the result three ways at once — your local timezone, strict UTC, and ISO 8601 format — so you can paste the right representation into a bug report, a query, or a support ticket.

This is the everyday move when debugging: a server log says an error happened at 1723622400, your monitoring dashboard shows a spike at “14:00 local”, and the converter tells you whether they are the same event or an hour apart.

Converting a date to a timestamp

The reverse direction matters just as often. Pick a date and time in the Date → Timestamp panel and you get the epoch value to embed in an API payload, seed a database record, set a cache expiry, or hard-code a test fixture. Timestamps are the standard currency for JWT expiry claims (exp, iat, nbf), rate-limit windows, and scheduled-job comparisons, all of which expect epoch seconds rather than formatted dates.

Epoch boundaries for range queries

A large share of real-world timestamp work is answering “everything from this day / this month / this year”. The Epoch Calculator gives you the exact second boundaries — start of today, end of the month, start of the year — so a query like created_at BETWEEN start_of_month AND end_of_month uses precise integers instead of hand-derived guesses that silently miss the last hour of the range.

Boundary values are also what you want for partitioning data, bucketing analytics by day, and writing retention policies that delete records older than a cutoff.

Seconds vs milliseconds — and the year 2038

The most common timestamp bug is a unit mismatch. Feed a milliseconds value where seconds are expected and your date lands tens of thousands of years in the future; do the reverse and you are back in January 1970. The 10-vs-13-digit rule of thumb (and this converter’s auto-detection) catches it instantly. Some systems go further — microseconds (16 digits) and nanoseconds (19 digits) appear in high-resolution logging — but seconds and milliseconds cover almost everything in application work.

The “year 2038 problem” is what happens to systems that store Unix time in a signed 32-bit integer: it overflows at 03:14:07 UTC on 19 January 2038. Modern 64-bit systems are unaffected, but the constraint still lives in old embedded devices, file formats, and database column types — worth knowing when you see a suspicious cap on how far ahead a date field will go.

Time unit conversions

The Time Unit Converter answers the supporting questions that come up alongside timestamps: how many seconds in a day (86,400), a week (604,800), or thirty days (2,592,000). These are the numbers you reach for when setting TTLs, cookie lifetimes, cache-control max-age headers, and token expiry windows — and getting them from a converter beats mental arithmetic that is off by a factor of 60.

Common use cases

Debugging logs and incidents

Turn raw epoch values from server logs into local times to line events up against dashboards and user reports.

API development and testing

Produce exact epoch values for request payloads, JWT expiry claims, and test fixtures — in seconds or milliseconds.

Database range queries

Get precise start-of-day, month, and year boundaries for BETWEEN clauses, partitions, and retention cutoffs.

Cache and token lifetimes

Convert human durations into the seconds that TTLs, max-age headers, and expiry windows expect.

Frequently asked questions

What is a Unix timestamp?

It is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970, known as the Unix epoch. It represents a single absolute instant as one integer, independent of timezones and date formats, which makes it the standard way computers store and compare points in time.

Is my timestamp in seconds or milliseconds?

Count the digits: current Unix timestamps are 10 digits in seconds and 13 digits in milliseconds. JavaScript’s Date.now() returns milliseconds; most backend systems and databases use seconds. This converter detects the unit automatically from the length.

Do Unix timestamps have a timezone?

No. A timestamp identifies an absolute instant, always relative to UTC. Timezones only enter when a timestamp is rendered as a human-readable date — the same value prints differently in different zones. If a converted date looks a few hours off, you are almost always comparing renderings in two different timezones, not two different instants.

What is the year 2038 problem?

Systems that store Unix time in a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038, wrapping to a negative number and reading as 1901. Modern 64-bit systems are safe for hundreds of billions of years, but the limit survives in legacy embedded systems, old file formats, and 32-bit database columns.

Can a Unix timestamp be negative?

Yes. Negative values count backwards from the epoch, so they represent moments before 1 January 1970. For example, −86400 is 31 December 1969 at 00:00:00 UTC. Most systems handle them, but some APIs and databases reject negative values, so pre-1970 dates deserve testing.

Do Unix timestamps count leap seconds?

No. Unix time pretends every day is exactly 86,400 seconds and ignores leap seconds entirely. When a leap second occurs, Unix time repeats or smears a second rather than counting it. For application work this never matters; for sub-second scientific timekeeping it is why standards like TAI exist.

How do I get the current Unix timestamp in code?

JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). PHP: time(). Go: time.Now().Unix(). SQL: extract(epoch from now()) in Postgres or UNIX_TIMESTAMP() in MySQL. All return seconds; drop the division in JavaScript if you want milliseconds.

Why does the converted date not match what my database shows?

Usually the database is rendering the same instant in a different timezone — the server’s session timezone rather than yours — or the value was stored as a local wall-clock time instead of UTC. Compare both values in UTC first; if they still differ, check whether one side is in milliseconds.

You might also like