Timestamp Converter
Convert Unix timestamps to readable dates — and dates back to timestamps. Live current timestamp shown.
About the Timestamp / Unix Time Converter
A Unix timestamp is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970 — the Unix epoch. It is the standard time representation in databases, APIs, log files, and server-side code because it is a single integer: timezone-independent, sort-friendly, and easy to do arithmetic on. JavaScript uses millisecond timestamps (13 digits); most Unix systems use second-precision (10 digits).
Common timestamp formats
- Unix seconds — 10-digit integer: 1748822400. Used in Unix systems, Python, and server logs.
- Unix milliseconds — 13-digit integer: 1748822400000. Used in JavaScript Date.now(), Java, and many databases.
- ISO 8601 — 2025-06-01T12:00:00Z. International standard for human-readable timestamps in REST APIs.
- RFC 2822 — Mon, 01 Jun 2025 12:00:00 +0000. Used in email headers and HTTP Date headers.
The Year 2038 problem
32-bit signed integers overflow on 19 January 2038 at 03:14:07 UTC. Modern 64-bit systems extend the range to the year 292 billion. If you work with embedded systems or legacy 32-bit databases, this is a real concern to address before 2038.
Working with timestamps in different databases
Different databases store and query timestamps differently. PostgreSQL's TIMESTAMPTZ stores UTC and converts to session timezone for display. MySQL TIMESTAMP stores UTC (max value: 2038-01-19); DATETIME stores local time with no timezone awareness. MongoDB stores ISODate() values as 64-bit UTC milliseconds. Always use timezone-aware types in production.
- PostgreSQL — use TIMESTAMPTZ (with time zone); avoid TIMESTAMP WITHOUT TIME ZONE for application data
- MySQL — TIMESTAMP (stores UTC, max 2038) vs DATETIME (no timezone, max 9999)
- SQLite — no native datetime type; store as ISO 8601 text or Unix integer
- MongoDB — ISODate() is UTC milliseconds; always consistent regardless of server timezone
Frequently Asked Questions
new Date(timestamp * 1000).toISOString() (multiply by 1000 if the timestamp is in seconds). Python: from datetime import datetime; datetime.utcfromtimestamp(ts). Terminal: date -d @1748822400 (Linux) or date -r 1748822400 (Mac).Math.floor(Date.now() / 1000) for seconds, or Date.now() for milliseconds. Python: import time; int(time.time()). PHP: time(). Bash: date +%s. PostgreSQL: SELECT EXTRACT(EPOCH FROM NOW()).