What Is a Unix Timestamp?
A Unix timestamp (also called Unix time, POSIX time, or epoch time) is a single integer that represents the number of seconds elapsed since 00:00:00 UTC on 1 January 1970 β a moment universally known as the Unix epoch. This deceptively simple idea underpins almost every piece of software that deals with dates and times, from the Linux kernel to cloud APIs to your favourite database.
Because a Unix timestamp is just a number, it is language-agnostic, timezone-agnostic, and trivially comparable and sortable. Adding 86 400 to any timestamp advances the time by exactly one day β no daylight-saving edge cases, no month-length arithmetic. That predictability is why engineers reach for timestamps whenever precision matters.
Our free timestamp converter online lets you convert a Unix timestamp to a human-readable date instantly β and convert back in the other direction β without writing a single line of code.
Unix Timestamp in Seconds vs Milliseconds
One of the most common sources of confusion is the difference between second-precision and millisecond-precision Unix timestamps.
| Property |
Seconds (10-digit) |
Milliseconds (13-digit) |
| Example |
1719187200 |
1719187200000 |
| Digit count |
10 digits (currently) |
13 digits (currently) |
| Precision |
1 second |
1 millisecond (0.001 s) |
| Common in |
Linux, C, Python time(), JWT |
JavaScript Date.now(), Java, logs |
| Convert to seconds |
Already in seconds |
Divide by 1000 |
π‘ Quick rule:
If your timestamp has 13 digits, it is in milliseconds. Select "Milliseconds" in the unit dropdown above before converting.
When you use our unix timestamp milliseconds converter, simply paste your 13-digit value and choose the "Milliseconds" option β the tool divides by 1 000 internally and displays the correct human-readable date and time.
Timestamp Converter ISO 8601 β Understanding the Format
ISO 8601 is the international standard for representing dates and times in a way that is unambiguous, machine-readable, and universally sortable. When you convert a Unix timestamp to date using this tool, the ISO 8601 output looks like this:
2025-06-24T14:30:00.000Z
Breaking it down:
| Part |
Meaning |
Example |
| YYYY-MM-DD | Date portion | 2025-06-24 |
| T | Separator between date and time | T |
| HH:MM:SS | Time (24-hour) | 14:30:00 |
| .000 | Milliseconds | .000 |
| Z | UTC timezone (Zulu) | Z or +05:30 |
The ISO timestamp converter on this page always outputs a fully qualified ISO 8601 string β including the timezone offset β so you can safely paste it into JSON payloads, REST APIs, GraphQL variables, or any log management system that expects a standard timestamp format.
Popular systems that consume ISO 8601 timestamps include: AWS CloudWatch, Elasticsearch / OpenSearch, Splunk, Datadog, Google Cloud Logging, and virtually every modern REST API.
SQL Timestamp Converter β Working with Databases
If you are working with a relational database, you will frequently need to convert between a Unix integer and a SQL TIMESTAMP or DATETIME column. The exact syntax differs by database engine:
MySQL / MariaDB
-- Unix timestamp β DATETIME
SELECT FROM_UNIXTIME(1719187200);
-- Result: 2024-06-24 00:00:00
-- DATETIME β Unix timestamp
SELECT UNIX_TIMESTAMP('2024-06-24 00:00:00');
PostgreSQL
-- Unix timestamp β TIMESTAMPTZ
SELECT to_timestamp(1719187200);
-- TIMESTAMP β Unix integer
SELECT EXTRACT(EPOCH FROM NOW())::BIGINT;
Microsoft SQL Server
-- Unix timestamp β DATETIME
SELECT DATEADD(SECOND, 1719187200, '1970-01-01');
-- DATETIME β Unix integer
SELECT DATEDIFF(SECOND, '1970-01-01', GETUTCDATE());
SQLite
-- Unix timestamp β readable datetime
SELECT datetime(1719187200, 'unixepoch', 'localtime');
-- Current Unix timestamp
SELECT strftime('%s', 'now');
Use our SQL timestamp converter to quickly find the human-readable equivalent of any value stored in a database column, so you can verify data without running a query each time. Just paste the integer above, click Convert, and immediately see the matching date and time.
How to Convert Unix Time to Date in Code
Here are copy-paste code snippets for the most popular programming languages. Each example converts the Unix timestamp 1719187200 to a human-readable date.
JavaScript
const ts = 1719187200;
const date = new Date(ts * 1000); // multiply by 1000 for ms
console.log(date.toISOString()); // "2024-06-24T00:00:00.000Z"
console.log(date.toLocaleString()); // local timezone string
Python
from datetime import datetime, timezone
ts = 1719187200
dt = datetime.fromtimestamp(ts, tz=timezone.utc)
print(dt.isoformat()) # 2024-06-24T00:00:00+00:00
# Reverse: date β timestamp
print(int(dt.timestamp())) # 1719187200
PHP
$ts = 1719187200;
echo date('Y-m-d H:i:s', $ts); // 2024-06-24 00:00:00
echo date('c', $ts); // ISO 8601
Go
import "time"
ts := int64(1719187200)
t := time.Unix(ts, 0).UTC()
fmt.Println(t.Format(time.RFC3339)) // 2024-06-24T00:00:00Z
Common Use Cases for a Timestamp Converter
π
Debugging API Responses
REST and GraphQL APIs often return created_at, updated_at, or expires_at as raw Unix integers. Paste them here to instantly understand when an event happened.
π
JWT Token Expiry
JSON Web Tokens store an exp (expiry) claim as a Unix timestamp. Decode your JWT, copy the exp value, and convert it to find exactly when the token expires.
ποΈ
Database Queries
Spot a suspicious row in your SQL table with an integer timestamp column? Convert it here in seconds instead of running a FROM_UNIXTIME() query.
π
Server & Application Logs
Log aggregators like Splunk, Datadog, and CloudWatch sometimes display raw epoch values. Convert them to understand the exact sequence of events during an incident.
β°
Cron Job Scheduling
Verify that your scheduled job ran at exactly the right time by converting the logged start/end timestamps and checking them against the expected schedule.
π
Timezone Conversion
A Unix timestamp is always UTC. Our converter shows you the equivalent time in your local timezone, UTC, and ISO 8601 β side by side β so you never get confused by DST or offsets.
Useful Timestamp Reference Points
Bookmark these commonly referenced Unix timestamp values for quick sanity-checking during development:
| Human-Readable Date (UTC) |
Unix Timestamp (s) |
Note |
| 1970-01-01 00:00:00 | 0 | The Unix Epoch |
| 2001-09-09 01:46:40 | 1,000,000,000 | 1 billion seconds |
| 2009-02-13 23:31:30 | 1,234,567,890 | Celebrated by developers worldwide |
| 2033-05-18 03:33:20 | 2,000,000,000 | 2 billion seconds |
| 2038-01-19 03:14:07 | 2,147,483,647 | 32-bit integer max β "Year 2038 problem" |
| 2106-02-07 06:28:15 | 4,294,967,295 | 32-bit unsigned integer max |
Frequently Asked Questions
How do I convert a Unix time to a date online?
οΌ
Paste your Unix timestamp (e.g. 1719187200) into the "Timestamp β Human Date" input at the top of this page, select the unit (Seconds or Milliseconds), choose your timezone, and click Convert. You will instantly see the corresponding date in local time, UTC, ISO 8601, and relative format (e.g. "3 days ago").
What is the difference between an ISO timestamp and a Unix timestamp?
οΌ
A Unix timestamp is a plain integer (e.g. 1719187200) β compact and easy for computers to store and compare, but unreadable to humans. An ISO 8601 timestamp is a standardised string (e.g. 2024-06-24T00:00:00Z) β human-readable and self-describing. They represent the same moment in time; the difference is purely representational.
Why does JavaScript use milliseconds for timestamps?
οΌ
When JavaScript was designed in 1995, the team chose millisecond precision for Date objects and Date.now() to allow timing of animations and user interactions at sub-second granularity. This means a JS timestamp is 1 000 Γ a Unix (second) timestamp. Always multiply by 1 000 when creating a JS Date from a Unix timestamp, and divide by 1 000 when going the other way.
What is the Year 2038 problem?
οΌ
Many older C-based systems store Unix timestamps as a signed 32-bit integer, which can hold a maximum value of 2 147 483 647 β corresponding to 19 January 2038, 03:14:07 UTC. On that date, the counter will overflow and wrap to a large negative number (interpreted as 1901), potentially causing software crashes or incorrect date calculations. Modern 64-bit systems are not affected because a 64-bit integer can represent dates hundreds of billions of years into the future.
Does a Unix timestamp account for leap seconds?
οΌ
No. Unix time deliberately ignores leap seconds and treats every day as exactly 86 400 seconds. This means that the difference between two Unix timestamps always gives you the number of nominal seconds, not the exact SI seconds. For most application development this is perfectly fine. Systems that require leap-second accuracy (GPS, atomic clocks, astronomy) use TAI or other specialised time scales instead.
How do I convert a timestamp to a date in SQL?
οΌ
The function depends on your database: MySQL uses FROM_UNIXTIME(ts), PostgreSQL uses to_timestamp(ts), SQL Server uses DATEADD(SECOND, ts, '1970-01-01'), and SQLite uses datetime(ts, 'unixepoch'). See the full code examples in the SQL section above.
Is my data safe when I use this tool?
οΌ
Completely. All timestamp conversion happens entirely in your browser using JavaScript. No data is ever sent to our servers, logged, or stored. You can even use this tool offline once the page has loaded.
Explore More Developer Tools
EzyToolbox has a growing collection of free tools built for developers.