Unix Timestamp Tools

Current Unix Time
Advertisement
// 01 โ€” Epoch โ†’ Human-readable date

Supports seconds (10 digits), milliseconds (13), microseconds (16), nanoseconds (19) โ€” auto-detected

Invalid timestamp. Please enter a numeric Unix timestamp.
โ€”
โ€”
โ€”
โ€”
โ€”
โ€”
// 02 โ€” Date โ†’ Epoch timestamp
โ€”
โ€”
โ€”
โ€”
Please check the values โ€” year (1970โ€“9999), month (1โ€“12), day (1โ€“31), hour (0โ€“23), min/sec (0โ€“59).

Or paste a date string:

Could not parse that date string.
Advertisement
// 03 โ€” Epoch range for year / month / day
โ€”
โ€”
โ€”
โ€”
// 04 โ€” Convert seconds to years, months, days, hours, minutes

86400 = 1 day  ยท  604800 = 1 week  ยท  2629800 = ~1 month  ยท  31536000 = 1 year

// 05 โ€” Batch timestamp conversion

One timestamp per line. Paste from logs, databases, or APIs.


  
Advertisement

What is a Unix timestamp?

A Unix timestamp (also called epoch time, POSIX time, or Unix time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC โ€” a reference point known as the Unix Epoch. It's a single integer, completely independent of timezones and daylight saving time.

Because it's just a number, timestamps are extremely efficient for databases to store, sort, and compare. You'll encounter them in API responses, server logs, JWT tokens, SQL databases, file system metadata, and virtually every modern software system.

Seconds vs milliseconds โ€” how to tell them apart

The most common source of confusion with Unix timestamps is the difference between seconds and milliseconds. This converter auto-detects the format based on digit count:

10 digits = seconds

Standard Unix time. Example: 1776422400. Used by most Unix/Linux systems, Python's time.time(), PHP's time(), and SQL's UNIX_TIMESTAMP().

13 digits = milliseconds

JavaScript's default. Example: 1776422400000. Used by Date.now(), Java's System.currentTimeMillis(), and most browser APIs.

16 digits = microseconds

Used in high-precision systems, some databases (PostgreSQL), and hardware timing. Example: 1776422400000000.

19 digits = nanoseconds

Used in Go's time.Now().UnixNano() and high-frequency trading systems. Example: 1776422400000000000.

Current timestamp in common programming languages

JavaScript / Node.js

Math.floor(Date.now() / 1000)
or Date.now() for ms

Python

import time
int(time.time())

PHP

time()
or microtime(true)

SQL

MySQL: UNIX_TIMESTAMP()
PostgreSQL: EXTRACT(EPOCH FROM NOW())

Go

time.Now().Unix()
or .UnixMilli()

Java / Kotlin

Instant.now().getEpochSecond()

Frequently asked questions

Copied!