How to Convert a Unix Timestamp to a Date (and Back)
Convert Unix timestamps to local time, UTC, and ISO 8601 — and dates back to timestamps — without ever confusing seconds and milliseconds.
By QR Ivify Team
A raw timestamp in a log file, a database row, or an API response — 1724064000 means nothing at a glance, but converting it to an actual date is a two-second task, with one very common way to get it wrong: mixing up seconds and milliseconds.
The Seconds vs. Milliseconds Trap
Unix time is conventionally measured in seconds since January 1, 1970 — but JavaScript's own Date object internally works in milliseconds, and a huge number of APIs and systems have inconsistent conventions about which one they actually use. Paste a seconds-based timestamp into a tool expecting milliseconds (or vice versa) and you get a wildly wrong date — off by a factor of 1000, which usually means landing somewhere in 1970 or thousands of years in the future, not a subtle few-hours-off error you might catch by eye.
QR Ivify's Unix Timestamp Converter never guesses which unit you mean — you choose seconds or milliseconds explicitly before converting, every time.
Step by Step
Timestamp → Date:
- Open the Unix Timestamp Converter.
- Choose whether your timestamp is in seconds or milliseconds.
- Enter the timestamp (or click "Now" for the current time) and convert.
- See the result as local date/time, UTC, and ISO 8601.
Date → Timestamp:
- Switch to the "Date → Timestamp" tab.
- Pick a date and time using the picker (interpreted in your own local time zone).
- Convert to get both Unix seconds and milliseconds.
Why Three Different Date Formats Are Shown
- Local date/time — what that timestamp means on your own device, in your own time zone.
- UTC — the same instant, in Coordinated Universal Time, useful for comparing timestamps without a time zone offset confusing the comparison.
- ISO 8601 — the standard, unambiguous machine-readable format (
2024-08-19T12:00:00.000Z), always in UTC, exactly what most APIs and databases expect.
Showing all three side by side means you never have to wonder which time zone a displayed date is actually in.
Frequently Asked Questions
How do I know if my timestamp is in seconds or milliseconds? A 10-digit number is typically seconds (covers dates until the year 2286); a 13-digit number is typically milliseconds. This tool requires you to choose explicitly rather than guessing, since guessing wrong silently produces a wildly incorrect date.
Does this show the time zone clearly? Yes — local time, UTC, and ISO 8601 (which is always UTC) are shown as separate, clearly labeled results, so there's no ambiguity about which time zone you're looking at.
Can I convert a date before 1970? Yes — negative timestamps (dates before the Unix epoch) are handled correctly.
Does this upload anything to a server? No. All conversion happens entirely in your browser using your device's own clock and date handling.
Try It
Need to convert a Unix timestamp to a real date, or a date to a timestamp? QR Ivify's free Unix Timestamp Converter always keeps seconds and milliseconds explicit. Generating test data at the same time? See UUID Generator.
Related articles
How to Decode Base64 Back to Text
Decode Base64 to text online for free, with correct Unicode handling and a clear error for invalid input instead of garbled output.
How to Base64 Encode Text (Without Breaking Unicode)
Encode text to Base64 online for free, with correct handling of Vietnamese, emoji, and other Unicode text — a common failure point in naive implementations.
How to Compare Two JSON Objects (Structurally, Not as Text)
Compare two JSON values online for free and see exactly what changed — key order and formatting differences are correctly ignored, unlike a plain text diff.