Unix Timestamp Converter
Convert Unix timestamps (seconds or milliseconds since epoch) to readable dates, or convert any date back to a Unix timestamp. Shows UTC, local time, and relative time. Everything runs in your browser.
Developer Tools
What This Tool Does
Converts Unix timestamps (seconds or milliseconds) to human-readable dates and vice versa, in your browser. Supports all major time zones and displays ISO 8601 format alongside local time.
Who This Is For
- Backend developers debugging timestamps in API responses, database records, or log files
- Data engineers investigating time-related bugs across different time zones
- Anyone who encounters a 10- or 13-digit number in a JSON payload and needs to know what date it represents
- Security analysts correlating log timestamps across systems
Example: Input: A Unix timestamp like 1735689600 → Output: Human-readable: Wed Jan 01 2025 00:00:00 UTC with ISO 8601, local time, and time-zone offset all shown
How to Use the Timestamp Converter
- Unix → Date: Enter a Unix timestamp (seconds or milliseconds since January 1, 1970 UTC) in the top field. The human-readable date and time appear instantly.
- Date → Unix: Enter a date and time in the lower section. The converter outputs the corresponding Unix timestamp in both seconds and milliseconds.
- The tool shows the time in both UTC and your local timezone simultaneously, so you can cross-reference both.
The tool automatically detects seconds (10-digit) or milliseconds (13-digit) timestamps, and pairs with the URL Encoder when timestamps appear in query parameters. The tool automatically detects whether your timestamp is in seconds (10 digits) or milliseconds (13 digits) based on the value range.
What Is a Unix Timestamp?
A Unix timestamp is the number of seconds (or milliseconds) that have elapsed since the Unix Epoch: midnight on January 1, 1970, UTC. It is the standard way most programming languages and databases represent a moment in time as a single number.
Unix timestamps are:
- Timezone-independent — a Unix timestamp always refers to a specific moment in UTC, regardless of where the code runs.
- Easy to sort — timestamps sort correctly as integers. No parsing needed.
- Arithmetic-friendly — subtract two timestamps to get a duration in seconds.
- Universally supported — every programming language, database, and OS natively handles Unix timestamps.
| Format | Example | Notes |
|---|---|---|
| Seconds | 1740355200 | 10 digits, standard Unix time |
| Milliseconds | 1740355200000 | 13 digits, used by JavaScript Date.now() |
| Microseconds | 1740355200000000 | 16 digits, used by PostgreSQL, high-precision logs |
| Nanoseconds | 1740355200000000000 | 19 digits, used by Go, Linux kernel, InfluxDB |
Common Timestamp Tasks
Get the current Unix timestamp
| Language / Tool | Code |
|---|---|
| JavaScript | Math.floor(Date.now() / 1000) |
| Python | import time; int(time.time()) |
| PHP | time() |
| SQL Server | DATEDIFF(s, '1970-01-01', GETUTCDATE()) |
| PostgreSQL | EXTRACT(epoch FROM now()) |
| MySQL | UNIX_TIMESTAMP() |
| Bash | date +%s |
Convert timestamp to readable date
| Language | Code |
|---|---|
| JavaScript | new Date(ts * 1000).toISOString() |
| Python | datetime.fromtimestamp(ts, tz=timezone.utc) |
| PHP | date('Y-m-d H:i:s', $ts) |
The Year 2038 Problem
Unix timestamps stored as 32-bit signed integers overflow on January 19, 2038 at 03:14:07 UTC. After that point, the value wraps to a large negative number, causing dates to be interpreted as December 13, 1901.
Modern systems use 64-bit timestamps which are good until the year 292,277,026,596 — well beyond any practical concern. If you are maintaining older C code, embedded systems, or databases with 32-bit integer timestamp columns, migration is worthwhile before 2038.
Time and Scheduling Workflow
Timestamp conversion connects to several related tools:
- Parse cron expressions — schedule jobs and convert their run times to readable dates
- Decode JWT tokens — JWT exp and iat fields contain Unix timestamps
- Format SQL queries that use DATEADD, DATEDIFF, or UNIX_TIMESTAMP functions
- Convert between time zones alongside Unix timestamp conversion
Related Tools
- Analyzing log data in CSV format? Convert to JSON for programmatic timestamp processing. → convert timestamp logs from CSV
- Got JSON log data with timestamps? Export to CSV for analysis in Excel or Google Sheets. → export timestamp data to a spreadsheet
- Writing about Unix timestamps for developers? Convert your Markdown guide to HTML to publish. → document timestamp handling in guides
- Migrating timestamp handling code from VB.NET to C#? Translate it instantly. → convert VB.NET DateTime code to C#
Related Guides
Unix Timestamps: What Every Developer Needs to Know
Why timestamps beat datetime strings for storage, comparison, and timezone handling.
TutorialCommon Timestamp Bugs and How to Avoid Them
Seconds vs milliseconds, DST edge cases, and timezone conversions that silently break production apps.
GuideJSON vs XML vs CSV: Which Data Format Should You Use?
Timestamps appear in every data format — know when to use ISO 8601 vs Unix epoch.
Frequently Asked Questions
new Date(ts * 1000).toISOString() returns a string like 2026-02-24T08:00:00.000Z. In Python: datetime.fromtimestamp(ts, tz=timezone.utc).isoformat().