Skip to content
ToolPlankDEV
Developer Tools
100% In-Browser Execution

Updated:

Unix Timestamp Converter: Epoch to Date and Date to Epoch

Paste a number or a date into this unix timestamp converter. It tells seconds, milliseconds, microseconds and nanoseconds apart, reads ISO 8601, RFC 2822 and written dates, and shows UTC or any time zone with week, day of year and DST. Nothing is uploaded.

Options:

Timestamps or dates

Input
0 chars · 0 lines

Converted

Ready
Processing in browser...
0 chars · 0 linesUpdates as you type

Details and checks

Unix seconds, milliseconds and nanoseconds, the date in UTC and your zone, relative time, ISO week, day of year, DST and notes appear here.

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use Unix Timestamp Converter

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste timestamps or dates

    Type or paste one value per line, or open a .txt, .log or .csv file. Numbers such as 1710055800 or 1710055800123 become dates, and dates such as 2024-03-10T07:30:00Z or Sun, 10 Mar 2024 07:30:00 GMT become timestamps. Example and the sample buttons load real cases, including log lines and IDs.

  2. 02

    Pick a time zone and format

    Time zone sets the zone for the result and for dates that have no offset of their own. Date format switches between ISO 8601, RFC 2822, HTTP date, SQL datetime, readable English and your browser locale. Timestamp unit picks seconds, milliseconds, microseconds, nanoseconds or seconds with decimals.

  3. 03

    Check the details and notes

    The details panel shows the first value in every unit, in UTC and in your zone, with relative time, weekday, day of year, ISO week, quarter, leap year, offset, daylight saving and the year 2038 check. Notes name the lines that were guessed, moved or rejected, and why.

  4. 04

    Copy or download the result

    Choose Result only, Input and result, CSV or JSON under Output. Press Copy to put the text on the clipboard, or Download to save it as a .txt, .csv or .json file.

How a unix timestamp converter works

A Unix timestamp is the number of seconds since 00:00:00 UTC on 1 January 1970, a moment called the Unix epoch. The number 1710055800 means 1,710,055,800 seconds after that moment, which is 07:30 UTC on 10 March 2024. A unix timestamp converter does that arithmetic for you in both directions and adds the calendar and time zone rules on top.

This tool works line by line. A number becomes a date, a date becomes a number, and a log line that contains epoch times gets those times replaced in place. Everything runs in your browser; see the Privacy Policy for what that means.

Text
1710055800 → 2024-03-10T07:30:00Z
1710055800123 → 2024-03-10T07:30:00.123Z
1710055800123456789 → 2024-03-10T07:30:00.123456789Z
-86400 → 1969-12-31T00:00:00Z
2147483648 → 2038-01-19T03:14:08Z
2024-03-10T02:30:00-05:00 → 1710055800
Sun, 10 Mar 2024 07:30:00 GMT → 1710055800
2024-07-04 18:00 → 1720116000

Seconds, milliseconds, microseconds or nanoseconds

Different systems count in different units. Unix shells, PHP and most databases use seconds. JavaScript's Date.now() and Java's System.currentTimeMillis() use milliseconds. Python's time.time_ns() and Go's UnixNano() use nanoseconds, and some logs use microseconds. Reading a millisecond value as seconds lands you tens of thousands of years in the future, so the unit matters.

With Input unit set to Auto, the tool picks the unit from the size of the number. Up to 11 digits is read as seconds, then milliseconds, microseconds and nanoseconds. The details panel says which unit was used. Set Input unit by hand when you know better, for example for a 12-digit value that is really seconds.

Text
Digits  Unit picked     Example                Result
10      seconds         1710055800             2024-03-10T07:30:00Z
13      milliseconds    1710055800123          2024-03-10T07:30:00.123Z
16      microseconds    1710055800123456       2024-03-10T07:30:00.123456Z
19      nanoseconds     1710055800123456789    2024-03-10T07:30:00.123456789Z

Date formats the converter reads

Dates do not need to be in one strict format. The parser reads the forms that show up in APIs, logs, emails and spreadsheets. When a date has no offset or zone name, it is read in the zone picked under Time zone, and a note says so.

  • ISO 8601 and RFC 3339: 2024-03-10T07:30:00Z, 2024-03-10T02:30:00-05:00, with up to nine fraction digits.
  • ISO 8601 week, ordinal and basic forms: 2024-W10-7, 2024-070, 20240310T073000Z.
  • RFC 2822 email dates: Sun, 10 Mar 2024 07:30:00 +0000, including EST, PDT and other US zone names.
  • JavaScript Date strings: Sun Mar 10 2024 02:30:00 GMT-0500 (Eastern Standard Time).
  • Apache and Nginx log dates: 10/Mar/2024:07:30:00 +0000.
  • Go and database output: 2024-03-10 02:30:00 -0500 EST, 2024-03-10 07:30:00.
  • Written dates: March 10, 2024 at 2:30 PM, 10th of March 2024 14:30.
  • Numeric dates such as 03/10/2024, read month first or day first as chosen under Numeric dates.
  • A zone name after the date: 2024-03-10 14:30 America/New_York.
  • The words now, today, yesterday and tomorrow.

Abbreviations that mean more than one zone, such as IST, are rejected with a message instead of guessed. A weekday that does not match the date is noted, and the date numbers win.

Time zones and daylight saving time

A timestamp has no time zone. It names one moment, and every zone shows that moment with its own clock. 1710055800 is 07:30 in UTC, 03:30 in New York and 13:00 in India. Time zone changes how the date is written, never which moment it is. The offsets and daylight saving rules come from the time zone data built into your browser.

Turning a local date into a timestamp is harder, because daylight saving creates clock times that do not exist and clock times that happen twice. In New York, 02:30 on 10 March 2024 never happened, because clocks jumped from 02:00 to 03:00. The tool moves such a time forward past the gap and says so. On 3 November 2024, 01:30 happened twice. The tool uses the first one and tells you how to pick the other.

Text
2024-11-03 01:30:00        (zone America/New_York) → 1730611800
2024-11-03 01:30:00 -0500  (offset given)           → 1730615400

The year 2038 problem and the range of dates

Older C programs and file formats keep time in a signed 32-bit integer. The largest value it can hold is 2147483647, which is 03:14:07 UTC on 19 January 2038. One second later the counter wraps around to a date in 1901. The tool flags every value past that limit, and before 13 December 1901, and the details panel shows whether the value fits.

Text
2147483647 → 2038-01-19T03:14:07Z   fits in 32 bits
2147483648 → 2038-01-19T03:14:08Z   does not fit

The tool itself is not limited to 32 bits. It accepts any moment a JavaScript date can hold, from about 271,821 BC to AD 275,760, with nanosecond precision. Years outside 0000 to 9999 are written in the expanded ISO form, such as +010000-01-01T00:00:00Z, and dates are read back with or without the sign, so 10000-01-01 and 275760-09-13T00:00:00Z both work. Negative timestamps are dates before 1970.

Leap seconds and what Unix time leaves out

UTC has had 27 leap seconds added since 1972, each written as 23:59:60. Unix time ignores them: every day is exactly 86,400 seconds. So the leap second at the end of 2016 and the first second of 2017 share one timestamp. The tool reads 23:59:60 the way POSIX does, as the first second of the next minute, and adds a note.

Text
2016-12-31T23:59:60Z → 1483228800
2017-01-01T00:00:00Z → 1483228800

Because of this, subtracting two Unix timestamps gives the elapsed seconds without leap seconds. For almost all software that is what you want. For precise science or satellite timing, use a time scale such as TAI instead.

Logs, IDs and other epochs

Log files often hold raw epoch numbers in the middle of a line. Direction Auto and Find in text replace every 10, 13, 16 or 19 digit number that falls between 2001 and 2100 with a readable date and leave the rest of the line alone. Output set to Input and result keeps the original number next to the date.

Text
1710055800 (2024-03-10T07:30:00Z) INFO server started on port 8080
[1710055861.482 (2024-03-10T07:31:01.482Z)] GET /api/orders 200 34ms
ts=1710055923000 (2024-03-10T07:32:03Z) level=warn msg="slow query" duration=1520ms

Some IDs carry their creation time. A MongoDB ObjectId keeps seconds in its first four bytes, UUID versions 1, 6 and 7 and ULIDs keep a time as well, so pasting one shows when it was made. A version 4 UUID is random and holds no time. Epoch also reads Apple Cocoa time (seconds from 2001), Windows FILETIME and LDAP values (100 nanosecond ticks from 1601), Chrome and WebKit time (microseconds from 1601) and Excel or Google Sheets serial dates.

Text
507f1f77bcf86cd799439011 → 2012-10-17T21:13:27Z
018f3c2e-7b4a-7c3d-9e1f-2a3b4c5d6e7f → 2024-05-03T02:00:30.282Z
2024-03-10T07:30:00Z with Epoch Excel → 45361.3125
2024-03-10T07:30:00Z with Epoch Windows FILETIME → 133545294000000000

To turn the results into a calendar file, the CSV to ICS converter builds events from a spreadsheet, and the ICS to CSV converter goes the other way. For repeating jobs, the cron expression generator shows when a schedule will run.

Get the current Unix timestamp in code

Each language has a one-line way to read the current time as a Unix timestamp and to turn one back into a date. Note the unit each one returns.

JavaScript
Math.floor(Date.now() / 1000);
new Date(1710055800 * 1000).toISOString();
Python
import time, datetime
int(time.time())
datetime.datetime.fromtimestamp(1710055800, datetime.timezone.utc).isoformat()
Bash
date +%s
date -u -d @1710055800 +%Y-%m-%dT%H:%M:%SZ
sql
SELECT EXTRACT(EPOCH FROM NOW())::bigint;
SELECT to_timestamp(1710055800) AT TIME ZONE 'UTC';

The macOS date command uses date -u -r 1710055800 instead of -d @. In MySQL, use UNIX_TIMESTAMP() and FROM_UNIXTIME(1710055800), which show the result in the session time zone.

Limits and privacy

The tool converts up to 50,000 lines and 2 million characters at a time. Find in text only matches numbers between 2001 and 2100, so it does not turn phone numbers or order IDs into dates, but it also skips older timestamps; paste those on their own line instead. Browser locale output depends on your language settings, and Local uses the zone your device reports. Excel serial numbers below 61 differ by one day from Excel itself, because Excel treats 1900 as a leap year.

Conversion happens in your browser. Nothing you paste is uploaded or stored on a server.

Frequently Asked Questions

Technical Q&A for Unix Timestamp Converter

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the number into the box and the date appears at once. The unit is detected from the length, and Time zone and Date format control how the date is written.

Paste the date, for example 2024-03-10 07:30:00 or Sun, 10 Mar 2024 07:30:00 GMT, and the timestamp appears. Dates without an offset are read in the chosen time zone, and Timestamp unit picks seconds, milliseconds or another unit.

Count the digits: a current timestamp has 10 digits in seconds and 13 in milliseconds. Microseconds have 16 and nanoseconds 19. The details panel shows which unit the tool used.

Yes, paste one value per line, up to 50,000 lines. Numbers and dates can be mixed, and CSV or JSON output adds Unix seconds, milliseconds and the UTC date for every line.

The default zone is UTC. Pick Local or your city under Time zone to see the same moment on your own clock.

Systems that store time in a signed 32-bit integer run out of room at 03:14:07 UTC on 19 January 2038, timestamp 2147483647. The tool flags every value past that point so you can spot fields that will overflow.

No. Unix time treats every day as 86,400 seconds, so a leap second such as 2016-12-31T23:59:60Z shares a timestamp with the next second.

Yes. A negative timestamp is a moment before 1 January 1970; -86400 is 31 December 1969 at 00:00 UTC.

Paste the log lines or open the file. Auto and Find in text replace each 10, 13, 16 or 19 digit epoch time between 2001 and 2100 with a date, and Input and result keeps the original number next to it.

Yes, paste the ID on its own line. ObjectIds, UUID versions 1, 6 and 7 and ULIDs hold a time, while a version 4 UUID is random and has none.