// converters
Unix Timestamp Converter.
Convert between Unix epoch, ISO 8601, RFC 2822, and human-readable dates with timezone awareness.
Decoded
What is a Unix timestamp?
A Unix timestamp is the number of seconds (or milliseconds) elapsed since January 1, 1970 00:00:00 UTC — known as the Unix epoch. It's a simple, timezone-independent way to represent dates and times in software. Every programming language has built-in functions to convert between timestamps and human-readable dates.
For example, the timestamp 1716291600 represents May 21, 2024 at a specific time in UTC. The same timestamp represents a different local time in every timezone. This tool shows the timestamp decoded in both your local timezone and UTC, so you can see the difference.
When to use timestamps.
API responses. Most APIs return timestamps as Unix seconds or milliseconds. When debugging an API, paste the timestamp here to see when the event actually occurred. Database records. SQL databases store timestamps as epoch values or DATETIME strings. Convert between formats to understand when records were created or modified.
Log analysis. Server logs often include Unix timestamps. Convert them to human-readable dates to correlate events across systems in different timezones. File systems. File modification times are stored as timestamps. Convert them to see when a file was last edited.
Seconds vs milliseconds.
Most systems use seconds (10-digit numbers), but some use milliseconds (13-digit numbers) for higher precision. JavaScript's Date.now() returns milliseconds. APIs like JSON Web Tokens use seconds. If your input has 13 digits, switch to milliseconds. The tool auto-detects the format based on the number of digits.
You can also paste an ISO 8601 date string (like 2024-05-21T14:30:00Z) and the tool will show the corresponding timestamp. This is useful when you have a date string from an API and need the epoch value for your code.
ISO 8601 and date formats.
ISO 8601 is the international standard for representing dates and times. The format 2024-05-21T14:30:00Z specifies year, month, day, hour, minute, second, and timezone (Z for UTC). ISO 8601 is widely used in APIs, databases, and configuration files because it's unambiguous, lexicographically sortable, and avoids locale-dependent formats like 05/21/2024 (which is May 21 in the US but May 21 everywhere — but 01/02/2024 is January 2 in the US and February 1 in much of Europe).
Other common formats include RFC 2822 (Tue, 21 May 2024 14:30:00 +0000), used in email headers; Unix time (seconds since epoch), used in databases and APIs; and human-readable formats like May 21, 2024. This tool converts between Unix timestamps and ISO 8601, letting you paste either format and see the corresponding values in multiple representations.
Timezone handling.
Timestamps are timezone-independent — 1716291600 is the same instant everywhere on Earth. What changes is the human-readable representation. In New York (EDT, UTC-4), that timestamp is 10:30 AM. In London (BST, UTC+1), it's 3:30 PM. In Tokyo (JST, UTC+9), it's 11:30 PM the same day. This tool shows both your local timezone and UTC, so you can see how the same moment translates across regions.
Daylight saving time (DST) complicates timezone conversions. A timezone offset may change depending on the time of year. UTC offsets are not constant for a given city. New York is UTC-5 in winter (EST) and UTC-4 in summer (EDT). When working with timestamps across DST boundaries, always use UTC as the reference point and convert to local time only for display purposes.
Working with timestamps in code.
In JavaScript, Date.now() returns milliseconds since epoch. new Date(timestamp) creates a Date object. In Python, datetime.fromtimestamp(ts) converts to local time, and datetime.utcfromtimestamp(ts) converts to UTC. In SQL, SELECT FROM_UNIXTIME(1716291600) converts in MySQL, and SELECT to_timestamp(1716291600) in PostgreSQL. The tool's output gives you the epoch value in both seconds and milliseconds, plus the ISO 8601 string, making it easy to plug into any language.
When debugging time-related bugs, paste the suspect timestamp here to see exactly when it occurred. Common issues include confusing seconds with milliseconds, using the wrong timezone in a Date constructor, and off-by-one errors around midnight when DST transitions happen. The tool's dual display (local + UTC) helps you identify these problems quickly.
FAQ
How do I convert a Unix timestamp to a human-readable date?
In JS: `new Date(1700000000 * 1000)`; Python: `datetime.fromtimestamp(1700000000)`; shell: `date -d @1700000000` (Linux) / `date -r 1700000000` (macOS).
Why is my Unix timestamp 13 digits instead of 10?
13 digits = milliseconds since epoch (JS `Date.now()`); 10 digits = seconds. Divide by 1000 for seconds: `new Date(msTimestamp)` in JS already handles ms.
How do I convert a date to a Unix timestamp?
JS: `Math.floor(new Date('2026-08-25').getTime() / 1000)`; Python: `int(datetime(2026, 8, 25).timestamp())`; shell: `date -d '2026-08-25' +%s`.
Why does my timestamp show the wrong time after timezone conversion?
Timestamps are always UTC; conversion to local time depends on the system's TZ. Use `toLocaleString()` (JS) / `astimezone()` (Python) for explicit timezones.
How do I convert between ISO 8601 and Unix timestamp?
ISO→timestamp: `Date.parse('2026-08-25T10:00:00Z') / 1000`; timestamp→ISO: `new Date(ts * 1000).toISOString()` — both are exact, no timezone loss if using `Z` (UTC).