Unix Timestamp Converter
Introduction
A Unix timestamp (or epoch time) is the standard way computers represent time: a single integer counting the seconds since January 1, 1970 at midnight UTC, excluding leap seconds. It appears in database records, API responses, JWT tokens, log files, cron schedules, and cache expiration headers. While machines read these integers instantly, humans need them translated into calendar dates and clock times — often in multiple formats simultaneously.
The Unix Timestamp Converter serves developers, system administrators, and security analysts who need to decode timestamps from logs, verify token expiration, schedule cron jobs across timezones, or quickly look up a historical or future epoch value. The tool is split into two independent blocks:
- Block A (Unix timestamp → Date & Time): enter a numeric timestamp and see it rendered in 21 date and time formats, organized by standard family.
- Block B (Date & Time → Unix timestamp): pick a calendar date, time, and timezone offset, and get the equivalent timestamp in seconds, milliseconds, and microseconds.
Both blocks have their own timezone selector, so you can work in UTC for one direction and a custom offset for the other without cross-contamination.
How It Works
Unix time counts seconds from the epoch (January 1, 1970, 00:00:00 UTC). Each tick adds exactly one second. Because it is anchored to UTC, a Unix timestamp represents the same instant everywhere on Earth — timezone only matters when you render it as a human-readable string.
The tool uses the browser's native JavaScript Date object for all conversions. Every Date internally stores time as a single number: milliseconds since the Unix epoch. When you enter a timestamp, the tool constructs a Date and reads its UTC or local properties depending on the active timezone selector. When you enter a calendar date and time, the tool computes the difference from the epoch adjusted for the specified timezone offset.
Timestamp Units Across Ecosystems
Different platforms and languages use different epoch units. The tool's unit selector lets you match your source's precision:
| Unit | Used by | Example |
|---|---|---|
| Seconds | Go, PHP, Python, PostgreSQL, Ruby, cron | 10 digits |
| Milliseconds | JavaScript (Date.now()), Ethereum, .NET DateTimeOffset, Java System.currentTimeMillis() |
13 digits |
| Microseconds | Linux /proc/uptime, Go time.UnixMicro(), high‑resolution profiling |
16 digits |
The tool converts your input to seconds internally. If you paste a 13-digit value from JavaScript's Date.now(), set the unit to milliseconds and the tool handles the division.
Time Zone & DST
A Unix timestamp always represents the same physical instant. The timezone selector in each block only changes how that instant is displayed or interpreted.
- UTC mode: renders all output against Coordinated Universal Time. The RFC 3339 format uses a literal
Zsuffix instead of+00:00. - Local mode: uses your browser's system timezone, including automatic Daylight Saving Time adjustments.
- Custom mode: a numeric UTC offset between -12:00 and +14:00. The tool applies this offset directly without any DST correction — it treats your offset as a fixed wall clock.
When DST is in effect, the local timezone offset changes. The same timestamp displayed in Local mode may show a different hour than it did the previous month. This is expected: the timestamp is the same, but the local clock convention changed.
For the locale-formatted rows (Locale, Locale Date, Locale Time), the tool respects both the selected timezone and your browser's language settings. If you choose UTC mode, toLocaleString receives { timeZone: 'UTC' }, ensuring the locale format uses the correct timezone.
Usage
Block A — Timestamp to Date & Time
- Enter a Unix timestamp into the input field (digits only, optional minus sign for pre‑1970).
- Select the input precision: Seconds, Milliseconds, or Microseconds.
- Choose a timezone: UTC, Local (your system timezone), or Custom (enter an offset between -12 and +14 in half‑hour steps).
- Read the results — 21 date and time format rows update in real time.
Block B — Date & Time to Timestamp
- Enter the year directly. Use the dropdown menus for month, day, hour, minute, and second.
- Choose a timezone from the UTC/GMT selector: Local matches your system timezone; numeric entries like
UTC+8treat the input as wall clock time in that zone. - The timestamp results appear immediately in seconds, milliseconds, microseconds, hexadecimal, and relative time.
The two blocks operate independently. Changing Block A does not affect Block B and vice versa. This lets you compare timestamps side by side or lock a reference value while exploring different formats.
Tutorial
Scenario 1: Decode a timestamp from a server log
Your application log shows timestamp 1742345678 — an API call that failed. You need to know exactly when it happened and also check the HTTP-date format for correlating with HTTP response headers.
- Open the Unix Timestamp Converter.
- Type
1742345678into Block A's input field. - The results display 21 format rows, including:
- @ Format:
3/19/2025 @ 2:14:38 PM +0000(quick‑scan human format) - RFC 1123Z:
Wed, 19 Mar 2025 14:14:38 +0000(HTTP-date standard, matchesDateandLast-Modifiedheaders) - Relative:
124d(how long ago the request occurred)
- @ Format:
- Switch the timezone to Local to see what time it was in your own timezone.
Scenario 2: Schedule a cron job at a specific time
You need a cron job to run at 3:30 AM Eastern Time on June 15, 2026. Eastern Daylight Time is UTC-4 in June.
- In Block B, set the date to June 15, 2026 and time to 03:30:00.
- Set the UTC/GMT selector to
UTC+4(EDT is UTC-4, so enter -4). - Read the Seconds value — this is your cron timestamp. The Hex and Relative rows also update, giving you a machine-readable and human-readable reference simultaneously.
Pro Tips
Format Use Cases
Each output format serves a specific purpose. Here is when to use each one:
| Format | When to use |
|---|---|
| @ Format | Quick visual scan — the compact M/D/YYYY @ HH:MM:SS AM/PM layout is readable at a glance |
| DateTime | SQL database inserts (YYYY-MM-DD HH:MM:SS), the most common string form outside JSON |
| ISO 8601 | JSON payloads (new Date().toISOString()), REST API request/response bodies |
| RFC 3339 | RSS feeds, Atom feeds, calendar subscriptions (iCalendar); used where ISO 8601 needs a stricter profile |
| RFC 1123Z | HTTP headers (Date, Last-Modified, Expires), cookies (expires attribute) |
| RFC 822 | Email headers (Date field), legacy newsgroup formats |
| RFC 850 | Older HTTP/1.0 implementations (rare today, kept for backwards compatibility) |
| ANSIC | Go's time.ANSIC constant — used when reading Go time.Time default output |
| RubyDate | Ruby's Time#ctime format; matches the classic Unix ctime output |
| DateOnly / TimeOnly | Go 1.20+ convenience constants — extract just the date or just the time |
| Kitchen | Go's 12‑hour clock format — quick wall‑clock reading |
| Locale | User interface display; respects the browser's language and cultural conventions |
| Hex | Low‑level debugging, firmware timestamps, embedded systems |
| Relative | Dashboard displays, "time since last event" UI elements |
Language Implementations
Get the current Unix timestamp in your language of choice:
// Go
time.Now().Unix() // seconds
time.Now().UnixMilli() // milliseconds (Go 1.17+)
// JavaScript
Math.floor(Date.now() / 1000) // seconds
Date.now() // milliseconds
// PHP
time(); // seconds
intval(microtime(true) * 1000); // milliseconds
# Python
import time; int(time.time()) # seconds
import time; int(time.time() * 1000) # milliseconds
General Tips
- Pre‑1970 timestamps: Enter negative values. December 1, 1960 at 00:00:00 UTC is
-286329600. - Hex input: Hexadecimal values (with or without
0xprefix) are parsed automatically — enter0x6618E1FEand see the decimal equivalent. - Compare timezones: Set Block A's timezone to UTC and Block A's timezone to Local simultaneously to see how the same instant renders in both.
Alternatives
| Tool | Timestamp to Date | Date to Timestamp | 21+ Formats | Independent timezone per block | Client‑side |
|---|---|---|---|---|---|
| Toollect Unix Timestamp Converter | Yes | Yes | Yes (21) | Yes | Yes |
| unixtimestamp.com | Yes | Yes | ~5 | No | Yes |
| epochconverter.com | Yes | Yes | ~8 | No | Yes |
| site24x7.com | Yes | Yes | ~6 | Full IANA | Yes |
date -d @timestamp (Linux) |
Yes | No | ~3 | System TZ only | N/A |
Troubleshooting
| Problem | Likely cause | Solution |
|---|---|---|
| Output shows a date in 1970 or 1969 | Input is being read in the wrong unit | Change the unit selector to match your input (seconds / ms / μs) |
| Date and time show the wrong moment | Timezone selector is set incorrectly | Switch to UTC to verify the base instant, then adjust to the correct offset |
| Locale row shows wrong time | Locale formatting ignores the Block A timezone selection | This was fixed — locale now respects the selected timezone. Verify you are on the latest version |
| Output does not update | The input contains non‑numeric characters | Clear the field and enter only digits and an optional leading minus |
| Relative time shows "just now" for a known past timestamp | Relative is calculated against the current system clock | This is expected — relative time always compares the timestamp to "now" |
| 13-digit input shows a date far in the future | The input is in milliseconds but the unit defaults to seconds | Switch the unit to "Milliseconds" |
Technical Specs
- Conversion engine: JavaScript
Dateobject (ECMAScript standard) - Timestamp range: Full JavaScript number range (±9 quadrillion seconds, covering billions of years)
- Supported input: Decimal integers, negative values (pre‑1970)
- Input precision: Seconds, milliseconds, or microseconds (configurable)
- Timezone support: UTC, local (browser system), custom GMT offset (-12 to +14 in 0.5‑hour steps); independent for each block
The 21 Format Families
| # | Group | Format | Example |
|---|---|---|---|
| 1 | Common | @ Format | 3/19/2025 @ 2:14:38 PM +0000 |
| 2 | Common | DateTime | 2025-03-19 14:14:38 |
| 3 | Common | ISO 8601 | 2025-03-19T14:14:38+00:00 |
| 4 | Common | RFC 3339 | 2025-03-19T14:14:38Z (UTC uses Z) |
| 5 | RFC | RFC 1123Z | Wed, 19 Mar 2025 14:14:38 +0000 |
| 6 | RFC | RFC 822 | 19 Mar 25 14:14 UTC |
| 7 | RFC | RFC 822Z | 19 Mar 25 14:14 +0000 |
| 8 | RFC | RFC 1123 | Wed, 19 Mar 2025 14:14:38 UTC |
| 9 | RFC | RFC 850 | Wednesday, 19-Mar-25 14:14:38 UTC |
| 10 | Go | ANSIC | Wed Mar 19 14:14:38 2025 |
| 11 | Go | UnixDate | Wed Mar 19 14:14:38 UTC 2025 |
| 12 | Go | RubyDate | Wed Mar 19 14:14:38 +0000 2025 |
| 13 | Go | DateOnly | 2025-03-19 |
| 14 | Go | TimeOnly | 14:14:38 |
| 15 | Go | Kitchen | 2:14PM |
| 16 | Go | Stamp | Mar 19 14:14:38 |
| 17 | Locale | Locale | 3/19/2025, 2:14:38 PM (browser‑dependent) |
| 18 | Locale | Locale Date | 3/19/2025 |
| 19 | Locale | Locale Time | 2:14:38 PM |
| 20 | Other | Hex | 0x6618E1FE |
| 21 | Other | Relative | 124d |
Format Family Tree
The date and time formats in this tool derive from four lineages:
- RFC 822 (1982) defined the original email date format with a 2‑digit year. RFC 1123 (1989) superseded it with a 4‑digit year. RFC 1123Z is the same format using a numeric timezone offset (
+0000) instead of an alphabetic abbreviation (UTC). Together these cover HTTP headers (1123Z) and email formats (822). - ISO 8601 (1988) established the international standard for date and time representation. RFC 3339 (2002) profiles ISO 8601 for Internet use, adding requirements like the mandatory
Zfor UTC. Most modern APIs choose one of these two. - Go time constants (
ANSIC,UnixDate,RubyDate, etc.) are convenience layouts built into the Go standard library. They mirror POSIX conventions (ctimeoutput), RFC standards, and Go‑specific convenience forms (DateOnly,Kitchen,Stamp). - Locale formats use the browser's
Intl.DateTimeFormatAPI, which follows the Unicode Common Locale Data Repository (CLDR). The exact output depends on the user's browser language setting.
Compatibility
- Browsers: Chrome 90+, Firefox 90+, Safari 15+, Edge 90+
- Dependencies: None — plain JavaScript, zero third‑party libraries
- Data processing: 100% client‑side — zero network requests
Features
- Bidirectional conversion between Unix timestamps and human-readable dates
- 21 date and time format outputs including RFC 1123, ISO 8601, and Go standard formats
- Independent timezone selectors for both conversion directions
- Configurable input unit: seconds, milliseconds, or microseconds
- Client-side processing — no data sent to any server