# Unix Timestamp Converter

> An epoch converter translates between Unix timestamps and human-readable dates in both directions. Unix time counts seconds since 1 January 1970 UTC, ignoring leap seconds, which is why it is the standard way to store an instant in a database or an API.

Source: https://rankcert.com/tools/epoch-converter
Free, no signup. Updated: 2026-08-29

## How to use it

1. Paste a timestamp in seconds or milliseconds - the length decides which.
2. Read it in UTC, ISO 8601 and your local timezone.
3. Or enter a date to get the timestamp back.

## Unix timestamp reference

Ten digits is seconds and thirteen is milliseconds. Reading one as the other is the single most common timestamp bug.

| Value | Meaning |
| --- | --- |
| 0 | 1 January 1970, 00:00:00 UTC - the epoch |
| 1000000000 | 9 September 2001 - the first ten-digit timestamp |
| 1700000000 | 14 November 2023 |
| 2147483647 | 19 January 2038 - signed 32-bit overflow |
| 86400 | Seconds in a day |
| 604800 | Seconds in a week |
| 2592000 | Seconds in 30 days |
| 31536000 | Seconds in a 365-day year |
| Math.floor(Date.now()/1000) | Current timestamp in JavaScript |
| date +%s | Current timestamp in a shell |
| extract(epoch from now()) | Current timestamp in Postgres |

## Questions

### Seconds or milliseconds?

Unix time is defined in seconds. JavaScript's Date.now returns milliseconds. A 10-digit number is seconds, a 13-digit number is milliseconds - mixing them is the single most common date bug there is.

### What is the year 2038 problem?

A signed 32-bit timestamp overflows on 19 January 2038. Anything storing time in a 32-bit integer breaks then. Use 64-bit integers or a native timestamp type.

### Does Unix time account for leap seconds?

No. It assumes every day is exactly 86,400 seconds, so it drifts from actual astronomical time. That is deliberate - it keeps the arithmetic simple.

### Why does my date show a day off?

Almost always a timezone issue. A date with no time component is midnight UTC, which is the previous day in any negative offset. Store and compare in UTC.

### Is my timestamp in seconds or milliseconds?

Count the digits. Ten digits is seconds and lands in the present; thirteen is milliseconds. A ten-digit value read as milliseconds gives a date in 1970, which is the classic symptom.

### What is the current Unix timestamp?

It increments every second. Get it with Math.floor(Date.now()/1000) in JavaScript, time.time() in Python, or date +%s in a shell.

### Why does my timestamp show the wrong day?

Timezone. A Unix timestamp is always UTC; the date you see depends on the zone used to format it. A midnight UTC timestamp is the previous evening in the Americas.

### Should I store dates as timestamps or as dates?

Store an instant as timestamptz in Postgres, which is a timestamp with the zone handled correctly. Store a calendar date with no time - a birthday, an invoice date - as a plain date, never as an epoch.

## Related tools

- [Roman Numeral Converter](https://rankcert.com/tools/roman-numeral-converter): Convert numbers to roman numerals and roman numerals back to numbers, with validation that rejects malformed numerals like IIII.
- [Unit Converter](https://rankcert.com/tools/unit-converter): Convert between metric and imperial units for length, weight, volume, time, digital storage and temperature, with exact conversion factors.
- [Caesar Cipher](https://rankcert.com/tools/caesar-cipher): Shift letters by any amount to encode or decode a Caesar cipher, including ROT13, with all 25 possible shifts shown at once for cracking.
- [Subnet Calculator](https://rankcert.com/tools/subnet-calculator): Enter any IPv4 address in CIDR notation to get the network and broadcast addresses, usable host range, subnet mask, wildcard mask and host count.
- [Aspect Ratio Calculator](https://rankcert.com/tools/aspect-ratio-calculator): Work out the missing width or height for any aspect ratio, simplify the ratio of any two dimensions, and check the megapixel count.
- [Barcode Generator](https://rankcert.com/tools/barcode-generator): Generate Code 128, EAN-13, UPC-A, Code 39, ITF-14, MSI and Pharmacode barcodes and download them as PNG. Runs entirely in your browser.