>_
smartdevbox
Try SmartDevBox free — no sign-up91+ tools · 100% client-side · no account required
Glossary

What Is a Unix Timestamp?

A Unix timestamp is a single integer: the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970 — a moment known as the Unix epoch. It is timezone-independent, making it the universal language for representing points in time across computer systems.

The One-Line Definition

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds elapsed since 1970-01-01 00:00:00 UTC. It is defined by the POSIX standard and is the most portable way to represent an absolute point in time.

Examples

TimestampHuman-readableNotes
01970-01-01 00:00:00 UTCThe epoch (time zero)
10000000002001-09-09 01:46:40 UTCFirst 10-digit timestamp milestone
17000000002023-11-14 22:13:20 UTCA recent timestamp (seconds)
17000000000002023-11-14 22:13:20 UTCSame moment in milliseconds (JavaScript default)
21474836472038-01-19 03:14:07 UTCMaximum value for signed 32-bit — the Year 2038 problem

Seconds vs Milliseconds — The Most Common Bug

The Unix standard defines time in seconds. However, JavaScript's Date.now() and many modern APIs return time in milliseconds. This produces a 13-digit number instead of a 10-digit one.

10-digit timestamp (seconds)1700000000
Standard Unix time. Used in POSIX APIs, JWT claims (exp, iat), and most server-side languages.
13-digit timestamp (milliseconds)1700000000000
JavaScript default (Date.now()). Also used in many REST APIs and database timestamps for sub-second precision.

If a timestamp calculation gives a result in 1970 or 55,000 years in the future, you almost certainly mixed up seconds and milliseconds. Divide by 1000 (or multiply by 1000) accordingly.

Why Does the Epoch Start on 1 January 1970?

The epoch date is a historical convention. When Unix was being developed at Bell Labs in the early 1970s, engineers chose a round date in the recent past that fit within the data types available at the time. The exact date has no deeper significance — it simply predates all Unix systems by a comfortable margin while remaining representable as a small positive integer.

The Year 2038 Problem

Legacy C programs and embedded systems often store timestamps as a signed 32-bit integer. The maximum value is 2,147,483,647, which corresponds to 2038-01-19 03:14:07 UTC. One second later, the integer overflows to a large negative number representing December 1901 — potentially causing crashes, incorrect date calculations, or security vulnerabilities.

Modern systems use 64-bit integers for timestamps, extending the valid range to approximately 292 billion years — safely beyond any practical concern.

Where Unix Timestamps Are Used

JWT claimsexp (expiration), iat (issued at), and nbf (not before) are all Unix timestamps in seconds.
Log filesServer logs and structured logs (JSON, syslog) commonly use Unix timestamps for machine-parseable, timezone-neutral timestamps.
DatabasesUNIX_TIMESTAMP() in MySQL, extract(epoch from ...) in PostgreSQL, and many NoSQL stores use epoch seconds or milliseconds.
File systemFile modification times (mtime, ctime, atime) in POSIX file systems are stored as Unix timestamps.
HTTP headersThe Expires and Last-Modified headers use RFC 7231 date strings, but many APIs accept or return epoch timestamps instead.
Distributed systemsEpoch timestamps enable consistent event ordering across multiple servers in different timezones without timezone conversion logic.

Convert a Unix Timestamp Now

Paste any Unix timestamp (10-digit seconds or 13-digit milliseconds) into SmartDevBox and it converts to UTC and local time automatically — no tool selection, no button click, no data sent to a server. Open the Unix Timestamp Converter →

Frequently Asked Questions

What is a Unix timestamp?

A Unix timestamp is the number of seconds elapsed since 1970-01-01 00:00:00 UTC (the Unix epoch). It is an integer — timezone-independent and universally understood by computers.

What is the difference between Unix timestamp seconds and milliseconds?

Seconds produce a 10-digit number (e.g. 1700000000). Milliseconds — the JavaScript default — produce a 13-digit number (e.g. 1700000000000). Mixing them up is a common source of bugs. Divide by 1000 to convert milliseconds to seconds.

What is the Year 2038 problem?

Systems storing timestamps as signed 32-bit integers overflow on 2038-01-19 at 03:14:07 UTC. Modern 64-bit systems are not affected. Embedded systems and legacy C code may still be at risk.

How do I convert a Unix timestamp online?

Paste your timestamp into SmartDevBox. It auto-detects 10-digit (seconds) and 13-digit (milliseconds) timestamps and shows the date in UTC and your local timezone instantly.

What Is a JWT?JWT exp, iat, and nbf claims are Unix timestamps in seconds.
What Is JSON?Log files and API responses that contain Unix timestamps are often JSON-formatted.
Unix Timestamp ConverterAuto-detects 10-digit and 13-digit timestamps. Converts to UTC and local time instantly.
JWT DecoderDecodes JWT exp and iat claims — paste the decoded value into the timestamp converter.